git-multi-user/README.md

48 lines
800 B
Markdown
Raw Normal View History

2020-12-09 18:26:04 +00:00
This lib permits to use different git users in the same session.
2020-11-04 21:31:18 +00:00
2020-12-09 18:26:04 +00:00
User just load its git configuration in a git repo.
2020-11-04 21:31:18 +00:00
2020-12-09 18:26:04 +00:00
Install
=======
2020-11-04 21:31:18 +00:00
2020-12-09 18:26:04 +00:00
Add the path to your `~/.bashrc`:
2020-11-04 21:31:18 +00:00
2020-12-09 18:26:04 +00:00
# Add git multi-user tool
PATH=$PATH:/path/to/git-multi-user
2020-11-04 21:31:18 +00:00
2020-12-09 18:26:04 +00:00
One may need to run `source ~/.bashrc` to make it ready.
2020-11-04 21:31:18 +00:00
2020-12-09 18:26:04 +00:00
Configuration
=============
2020-11-04 21:31:18 +00:00
2020-12-09 18:26:04 +00:00
Create a config file (one can used Alban one as example):
cp .gitconfig_alban .gitconfig_john
Modify at least `name` and `email`.
2020-11-04 21:31:18 +00:00
2020-12-09 18:26:04 +00:00
**Note:** It is better if the session does not have any git account.
I don't really dig up a mixed configuration.
2020-11-04 21:31:18 +00:00
2020-12-09 18:26:04 +00:00
Usage
=====
To start working in a git repo:
git-start alban
When job is done:
git-stop
2020-11-04 21:31:18 +00:00
2020-12-09 18:26:04 +00:00
Easy ! ;)
2020-11-04 21:31:18 +00:00
2020-12-09 18:26:04 +00:00
**Note:** Git-multi-user replaces git variable `include.path`.
Be carefull that it is not already used.