A small shell script for managing multiple git identities (name/email, and any other config keys) and switching between them per-repository or globally.
Run the included install.sh:
./install.shBy default this installs to ~/.local/bin/git-profile. Make sure that
directory is on your PATH.
To install somewhere else, set PREFIX (the script installs to
$PREFIX/bin):
PREFIX=/usr/local ./install.shAlternatively, install manually:
cp git-profile /usr/local/bin/git-profile
chmod +x /usr/local/bin/git-profile# create a couple of profiles
git-profile new work
git-profile new personal
# apply one globally, or just to the current repo
git-profile use personal
git-profile use work --local
# see what you've got
git-profile ls
git-profile get work