A helper utility for managing and switching between global git user profiles.
It unloads all existing ssh keys from ssh-agent, loads the key for the specified profile, and sets the global git user name and email.
Usage: gitch <profile>
Options:
-h, --help Show this help message and exit
-v, --version Show version number and exit
-c, --create Create a new git alias
-l, --load Load a git user config and add it to the SSH agent. Default action.
--list List all available git user profiles
Example: gitch work- Clone the repository
- Run
make installto install the binary to/usr/local/bin/gitch
brew tap tobyvee/tap
brew install gitch- Run
make uninstallto remove the binary from/usr/local/bin/gitch
To create a new git user profile, use the --create, -c option and follow the prompts:
gitch -c <name>
Creating new git user profile: <name>
Enter your name: Test User
Enter your email: test@nomail.com
Enter path to SSH private key: /Users/test/.ssh/pubkey.pubUsing the above example, to switch to the profile, run:
gitch <name>