git-su-0.1.0 has been yanked.
git-su
This project is inspired by gitsu. It provides a flexible way to manage multiple Git users, quickly switch identities, and easily support multi-user (pair programming) commits, all implemented in Rust.
Installation
If you see No manual entry for git-su, install the man page:
# User-level (recommended): copy to ~/.local/share/man/man1/ or your MANPATH
||
# Or system-wide (requires privileges):
# sudo cp man/man1/git-su.1 /usr/local/share/man/man1/
# sudo mandb
Usage
- Show current user:
git su - Switch user:
git su "John Galt <jgalt@example.com>"or add first, then switch by initials - Add user:
git su --add "John Galt <jgalt@example.com>" - Switch by initials or name:
git su jg,git su raphe - Pair (multiple users):
git su jg rr - List saved users:
git su --list - Clear current user:
git su --clear(optionally with--local/--global/--system) - Scopes:
-l/--local,-g/--global,-s/--system
The user list is stored in ~/.git-su in TOML format. Example:
[[]]
= "John Galt"
= "jgalt@example.com"
[[]]
= "Raphe Rackstraw"
= "rrack@example.com"
Configuration (Git config)
gitsu.defaultSelectScope: default scope when switching, one oflocal|global|systemgitsu.groupEmailAddress: group email domain for pairing, defaultdev@example.com