4

Whenever I commit something, it shows up a commit message on GitHub as follows:

Sample commit message

I am working with Intellij-IDEA (in case this is relevant).

Questions:

  • Why does my name "Bernhard" appear twice? Note that there are also two avatars at the start of the commit message.
  • I actually have a picture on GitHub that is normally automatically used as the avatar. Why is it not used here (for neither of the two avatars)?

My team and I have no clue what could cause this. Any suggestions what I should try/check?

1 Answer 1

5

Why does my name "Bernhard" appear twice? Note that there are also two avatars at the start of the commit message.

Git always keeps track of two people: the person who wrote the patch (author) and the person who committed it into Git (committer). These fields are usually identical when using regular 'git commit', and indeed both are taken from "user.name" & "user.email" settings.

However, they can be different when rebasing/rewriting history (including GitHub's "squash and merge"), or e.g. when a maintainer applies a collection of emailed patches (as is common practice in Linux.git). These, and even simple git commit --amend, will preserve the original author but will update the new committer.

So when GitHub shows two people with apparently the same name, this means the parts which aren't shown are different – that is, the last name and/or the email address must be different. Go to your local repository in command line and use git log --format=fuller to see the differences (and possibly a clue as to where they're coming from).

I actually have a picture on GitHub that is normally automatically used as the avatar. Why is it not used here (for neither of the two avatars)?

GitHub uses the author's/committer's email address to detect the corresponding GitHub account (matching against addresses you've listed in the account's settings).

Again, use git log --format=fuller to check what email addresses are attached to this commit.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .