Created
December 7, 2017 15:55
-
-
Save 1e4/57d07abd3cfe86cb5d420d396bf219af to your computer and use it in GitHub Desktop.
Quick bash script for changing local git repo config settings
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
function gitconfig { | |
if [ "$1" == "" ]; then | |
echo "Empty username (Usage gitconfig username email)" | |
else | |
git config user.name "$1" | |
echo "Set git username to $1" | |
fi | |
if [ "$2" == "" ]; then | |
echo "Empty email (Usage gitconfig username email)" | |
else | |
git config user.email "$2" | |
echo "Set git username to $2" | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment