Created
October 27, 2016 15:03
-
-
Save adriaPerez/3248780bda0039f69ea84e3090b48033 to your computer and use it in GitHub Desktop.
Change multiple git configurations
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
#!/bin/bash -l | |
#$ -S /bin/bash | |
#$ -N $1 | |
if [ $1 = "github" ] | |
then | |
echo "Github profile activated!" | |
git config --global user.name "USERNAME" | |
git config --global user.email "EMAIL" | |
elif [ $1 = "gitlab" ] | |
then | |
echo "Gitlab profile activated!" | |
git config --global user.name "USERNAME" | |
git config --global user.email "EMAIL" | |
else | |
echo "$1 doesn't match any profile :(" | |
fi | |
# For simplier use, add an alias like so: | |
# alias git-profile="sh ~/git-profile.sh" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment