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.
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.

View File

@ -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:"

View File

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