Skip to content

Instantly share code, notes, and snippets.

@1e4
Created December 7, 2017 15:55
Show Gist options
  • Save 1e4/57d07abd3cfe86cb5d420d396bf219af to your computer and use it in GitHub Desktop.
Save 1e4/57d07abd3cfe86cb5d420d396bf219af to your computer and use it in GitHub Desktop.
Quick bash script for changing local git repo config settings
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