diff --git a/README.md b/README.md index 00c5915..3078f8a 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,15 @@ +Git Multi User +============== + + This lib permits to use different git users in the same session. -User just load its git configuration in a git repo. +User just loads its git configuration in a git repo when needed. +And clean it when job is done. Install -======= +------- Add the path to your `~/.bashrc`: @@ -16,7 +21,7 @@ One may need to run `source ~/.bashrc` to make it ready. Configuration -============= +------------- Create a config file (one can used Alban one as example): @@ -24,14 +29,13 @@ Create a config file (one can used Alban one as example): Modify at least `name` and `email`. - -**Note:** It is better if the session does not have any git account. -I don't really dig up a mixed configuration. +**Warning:** Git-multi-user replaces git variable `include.path`. +Be carefull that it is not already used. Usage -===== +----- To start working in a git repo: @@ -42,6 +46,3 @@ When job is done: git-stop Easy ! ;) - -**Note:** Git-multi-user replaces git variable `include.path`. -Be carefull that it is not already used. diff --git a/git-start b/git-start index b273d95..d3157f4 100755 --- a/git-start +++ b/git-start @@ -1,5 +1,7 @@ #!/usr/bin/env bash set -eu + + if [ "$#" -ne 1 ]; then echo "Hey man, give me your name !" echo "See, like this:" diff --git a/git-stop b/git-stop index 82b14ff..f9c0ec7 100755 --- a/git-stop +++ b/git-stop @@ -1,3 +1,4 @@ #!/usr/bin/env bash +set -eu git config --local --unset include.path