readme principal plus joli v4

This commit is contained in:
eleonore12345 2024-07-25 11:18:56 +02:00
parent f7117b937a
commit 8635fb95b4

View File

@ -61,13 +61,13 @@ git gc --prune=now [--aggressive]"
```
## Examples
A) Cloning the last commit of a branch into a non-existing directory
**A) Cloning the last commit of a branch into a non-existing directory**
`git_update.sh -r myBranch -d myDirectory $REMOTE_URL`
Result: a directory myDirectory has been created in the current working directory. It is filled with the files of the last commit of branch myBranch as well as the .git. The history only shows the last commit.
**Result:** a directory myDirectory has been created in the current working directory. It is filled with the files of the last commit of branch myBranch as well as the .git. The history only shows the last commit.
B) Updating the current working directory repository, moving it from its current state to a certain tag, calling for an aggressive garbage collection.
**B) Updating the current working directory repository, moving it from its current state to a certain tag, calling for an aggressive garbage collection.**
`git_update.sh -r myTag -a $REMOTE_URL`
Result: untracked files are still here. all the tracked files have been changed to respect the tag commit. The history only shows the last commit.
**Result:** untracked files are still here. all the tracked files have been changed to respect the tag commit. The history only shows the last commit.
git gc has been called with the --aggressive option, hence the objects in the .git have been repacked so as to optimize memory.
CAREFUL: git branch still displays the original branch name and not the one of the tag.