Skip to content

Instantly share code, notes, and snippets.

@wilcorrea
Created April 24, 2024 01:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wilcorrea/1c9fb14ad542d8efbfaa6e0cf09f233c to your computer and use it in GitHub Desktop.
Save wilcorrea/1c9fb14ad542d8efbfaa6e0cf09f233c to your computer and use it in GitHub Desktop.
gu () {
if [ -z "$1" ]; then
echo "Help"
echo " 0: 'a@mail.com'"
echo " 1: 'b@mail.com'"
else
case $1 in
0) account="a@mail.com";;
1) account="b@mail.com";;
esac
git config --global core.sshCommand "ssh -i /Users/<user>/.ssh/id_ed255199[$account]"
echo "Git SSH Command updated"
echo "~/.gitconfig"
echo "--"
cat /Users/<user>/.gitconfig
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment