From 968d9d32f5c172cb3ee5a8db9f5861809c348704 Mon Sep 17 00:00:00 2001 From: eleonore12345 Date: Thu, 25 Jul 2024 11:15:08 +0200 Subject: [PATCH] =?UTF-8?q?readme=20principal=20avec=20retours=20=C3=A0=20?= =?UTF-8?q?la=20ligne?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 996773e..e3e3f8d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Overview -git_update.sh is a bash script performing a punctual synchronization of a git repository. It can either be a new clone or an update. +git_update.sh is a bash script performing a punctual synchronization of a git repository. It can either be a new clone or an update. *CAREFUL*: git_update.sh is not working-directory safe and can delete your work. ``` git_update.sh -d ~/website -r V3 $REMOTE_URL @@ -9,7 +9,7 @@ Each time this command is called, the ~/website directory is resync with corresp # Installation -Download the git_update.sh file. You can place it in /usr/local/bin. +Download the git_update.sh file. You can place it in /usr/local/bin. Dependencies: Bash and Git # Use @@ -43,9 +43,9 @@ DESCRIPTION git_update.sh will only clone in an empty repository, by default the current working directory. If called in a repository with a .git directory, it will update (see below). If called in a repository with untracked files, it will fail. -Only the commit and the necessary objects will be cloned. The commit can be indicated through a reference, either a tag or branch, otherwise the last commit of main is the default. +Only the commit and the necessary objects will be cloned. The commit can be indicated through a reference, either a tag or branch, otherwise the last commit of main is the default. *CAREFUL*: the command git branch will always show the original branch name and will not follow the eventual branch changes. -git_update.sh clones using +git_update.sh clones using `git clone --recurse-submodules --shallow-submodules --depth=1` ## Updating @@ -63,13 +63,13 @@ git gc --prune=now [--aggressive]" A) Cloning the last commit of a branch into a non-existing directory -`git_update.sh -r myBranch -d myDirectory $REMOTE_URL` +`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. 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. -git gc has been called with the --aggressive option, hence the objects in the .git have been repacked so as to optimize memory. +`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. +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. # Development process @@ -83,7 +83,7 @@ Please refer to /doc/development_explanations for more information about the tes # Testing -The script test_git_update.sh can be found at /test/functional_tests. It will create a repository to test on before testing. +The script test_git_update.sh can be found at /test/functional_tests. It will create a repository to test on before testing. Please refer to the readme of test and the readme of test/functional_tests. # How to contribute