Created
June 14, 2016 05:16
-
-
Save gouf/fdd82fa1f74dc23924e51fdd2b035132 to your computer and use it in GitHub Desktop.
Switch git author
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 switch_git_config () { | |
name=$1 | |
email=$2 | |
git config --global user.name $name | |
git config --global user.email $email | |
echo "Configuration has changed:" | |
echo "git config user.name: $(git config user.name)" | |
echo "git config user.email: $(git config user.email)" | |
} | |
function example_user () { | |
switch_git_config "example" "[email protected]" | |
} | |
function example_user2 () { | |
switch_git_config "example" "[email protected]" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment