Skip to content

Instantly share code, notes, and snippets.

@adriaPerez
Created October 27, 2016 15:03
Show Gist options
  • Save adriaPerez/3248780bda0039f69ea84e3090b48033 to your computer and use it in GitHub Desktop.
Save adriaPerez/3248780bda0039f69ea84e3090b48033 to your computer and use it in GitHub Desktop.
Change multiple git configurations
#!/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