Created
July 9, 2024 17:10
-
-
Save mabsboza/81cdae4248a6a66d62716f40e03ba7f9 to your computer and use it in GitHub Desktop.
This file contains 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
if [ "$#" -ne 1 ]; then | |
echo "Usage: $0 [personal|work1|work2]" | |
exit 1 | |
fi | |
if [ "$1" == "personal" ]; then | |
git config --global user.name "Tu Nombre" | |
git config --global user.email "[email protected]" | |
elif [ "$1" == "chile" ]; then | |
git config --global user.name "Tu Nombre Trabajo 1" | |
git config --global user.email "[email protected]" | |
elif [ "$1" == "usa" ]; then | |
git config --global user.name "Tu Nombre Trabajo 2" | |
git config --global user.email "[email protected]" | |
else | |
echo "Invalid option. Use one of [personal|work1|work2]" | |
exit 1 | |
fi | |
echo "Git user configuration updated to $1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment