3

I'd like to be able to switch the name and email in git, I tried this:

alias setup_diffuser='export GIT_COMMITTER_NAME="Blah" && export GIT_COMMITTER_EMAIL="blah@blah.com" && export GIT_AUTHOR_NAME="Blah" && GIT_AUTHOR_EMAIL="blah@blah.com" && export BLAH="true"'

but the name in the git commit is correct but the email is the one in ~/.gitconfig not the email in$GIT_AUTHOR_EMAIL How can I set the email on the fly like above without editing the ~/.gitconfig? I'm running git version 1.7.3.4

errorhandler
  • 1,757
  • 3
  • 22
  • 29

1 Answers1

3

You forgot an export for GIT_AUTHOR_EMAIL :

alias setup_diffuser='export GIT_COMMITTER_NAME="Blah" && export GIT_COMMITTER_EMAIL="blah@blah.com" && export GIT_AUTHOR_NAME="Blah" && export GIT_AUTHOR_EMAIL="blah@blah.com" && export blah="true"'
CharlesB
  • 86,532
  • 28
  • 194
  • 218