4

I just checked my git log and noticed that the email address for commits is different than for merges. I'm wondering what might be causing that so I can figure out how to make it so my email address for commits is the one I want.

(I've seen solutions for the problem - I'm more curious as to why this is happening.)

5
  • 2
    Is this your email address that's different or someone else's?
    – CrazyCasta
    Commented Sep 30, 2012 at 19:59
  • 2
    Are you performing the merges via GitHub, or with git merge?
    – Fred Foo
    Commented Sep 30, 2012 at 20:04
  • It's my email address that is different. And I'm performing them via GitHub.
    – tvalent2
    Commented Sep 30, 2012 at 20:28
  • P.S. If you are using git-hub which your original tagging suggested, please mention it in the question and retag it back in.
    – CrazyCasta
    Commented Sep 30, 2012 at 20:28
  • You need to actually mention that you're using github in the question or you're likely to have the tag removed again.
    – CrazyCasta
    Commented Sep 30, 2012 at 20:30

2 Answers 2

3

It is possible that you are merging using your github account and the email address for your github account is different than the email address you use in your git config on your machine.

You can change this for only one repository by using git config user.email <email-address> for your local repository. If this does not work, make sure you have not set the GIT_COMMITTER_EMAIL or GIT_AUTHOR_EMAIL variables.

Additionally, you can use --global to make changes for all your git repositories on your local EG: git config --global user.email <email-address>

2
  • That looks like it could fix the solution thanks. However I'm wondering why that was needed.
    – tvalent2
    Commented Sep 30, 2012 at 20:33
  • When you configure git, you usually don't set the user config details :D Also, people have multiple email addresses. Sometimes thing mess up man ;) Commented Sep 30, 2012 at 21:38
0

It could be because of a setting in GitHub

Keep my email addresses private

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.