This commit is contained in:
Alban Bronisz 2020-12-09 18:29:52 +00:00
parent a4718158be
commit ac71562f21
3 changed files with 14 additions and 10 deletions

View File

@ -1,10 +1,15 @@
Git Multi User
==============
This lib permits to use different git users in the same session. 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 Install
======= -------
Add the path to your `~/.bashrc`: Add the path to your `~/.bashrc`:
@ -16,7 +21,7 @@ One may need to run `source ~/.bashrc` to make it ready.
Configuration Configuration
============= -------------
Create a config file (one can used Alban one as example): 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`. Modify at least `name` and `email`.
**Warning:** Git-multi-user replaces git variable `include.path`.
**Note:** It is better if the session does not have any git account. Be carefull that it is not already used.
I don't really dig up a mixed configuration.
Usage Usage
===== -----
To start working in a git repo: To start working in a git repo:
@ -42,6 +46,3 @@ When job is done:
git-stop git-stop
Easy ! ;) Easy ! ;)
**Note:** Git-multi-user replaces git variable `include.path`.
Be carefull that it is not already used.

View File

@ -1,5 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -eu set -eu
if [ "$#" -ne 1 ]; then if [ "$#" -ne 1 ]; then
echo "Hey man, give me your name !" echo "Hey man, give me your name !"
echo "See, like this:" echo "See, like this:"

View File

@ -1,3 +1,4 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -eu
git config --local --unset include.path git config --local --unset include.path