Skip to content

Instantly share code, notes, and snippets.

@otsuarez
Created October 21, 2013 02:43
Show Gist options
  • Save otsuarez/7077945 to your computer and use it in GitHub Desktop.
Save otsuarez/7077945 to your computer and use it in GitHub Desktop.
git-author.sh
if [ ! -d "~/bin" ]; then mkdir ~/bin ; fi
cat >~/bin/config-otsuarez.sh<<'EOF'
#!/bin/sh
export GIT_AUTHOR_USER="otsuarez"
export GIT_AUTHOR_EMAIL="otsuarez@example.com"
EOF
cat >~/bin/config-john.sh<<'EOF'
#!/bin/sh
export GIT_AUTHOR_NAME="John Doe"
export GIT_AUTHOR_EMAIL="john.doe@example.com"
EOF
chmod 755 ~/bin/config-*
# since these are enviroment variables, the script is not meant to be executed
# but rather sourced into current shell session
# usage: . ~/bin/config-john.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment