git-multi-user/README.md

49 lines
763 B
Markdown
Raw Permalink Normal View History

2020-12-09 18:29:52 +00:00
Git Multi User
==============
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:29:52 +00:00
User just loads its git configuration in a git repo when needed.
And clean it when job is done.
2020-11-04 21:31:18 +00:00
2020-12-09 18:26:04 +00:00
Install
2020-12-09 18:29:52 +00:00
-------
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-12-09 18:29:52 +00:00
-------------
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:29:52 +00:00
**Warning:** Git-multi-user replaces git variable `include.path`.
Be carefull that it is not already used.
2020-11-04 21:31:18 +00:00
2020-12-09 18:26:04 +00:00
Usage
2020-12-09 18:29:52 +00:00
-----
2020-12-09 18:26:04 +00:00
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 ! ;)