Last active
August 29, 2016 21:28
-
-
Save cytopia/466d3eef2fffe02b99a421c08e9dd107 to your computer and use it in GitHub Desktop.
Manage multiple git identities
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Handle git identities | |
# | |
# Load this in your bash/zsh config | |
# | |
# Show identity | |
git-ident-show() { | |
git config --get user.name | |
git config --get user.email | |
git config --get user.signingkey | |
} | |
# Switch to default ident | |
git-ident-make-work() { | |
git config user.name "First Last" | |
git config user.email "[email protected]" | |
git config user.signingkey "0000FFFF" | |
git-ident-show | |
} | |
# Switch to alternative ident | |
git-ident-make-home() { | |
git config user.name "First Lnast" | |
git config user.email "[email protected]" | |
git config user.signingkey "AAAABBBB" | |
git-ident-show | |
} | |
# Switch to alternative ident | |
git-ident-make-cytopia() { | |
git config user.name "cytopia" | |
git config user.email "[email protected]" | |
git config user.signingkey "695128A2" | |
git-ident-show | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment