24

GitHub shows that my commits have been pushed by 2 authors: me and me.

How can I turn it off?
That is, how can I avoid seeing "me" and "me" (twice my GitHub account) as "authors" of a commit?

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
Matviy
  • 279
  • 3
  • 11

3 Answers3

36

its happens when your local Git configuration doesn't match with your Github account.

you can check this by:

git config --global user.email

to change your email configuration

git config --global user.email "your email"

Milad Nourizade
  • 461
  • 4
  • 5
7

First, make sure this is authorship, not "author" and "committer".

If we are talking about two authors (as seen in the picture below) ,then this recent, since GitHub only announced it a few days ago (January 2018):
"Commit together with co-authors"

To add co-authors to a commit, just add one or more "Co-authored-by" trailers to the end of the commit message:

Commit message

Co-authored-by: Joel Califa <602352+califa@users.noreply.github.com>
Co-authored-by: Matt Clark <44023+mclark@users.noreply.github.com>

Include your trailers at the end of your commit message, and have at least one line of white space before them.

See the official documentation.

In your case, that means any commit with multiple "Co-authored by" would be displayed that way:

https://user-images.githubusercontent.com/602352/35053024-b818ee72-fbb1-11e7-93f8-11baf411f1c1.gif

How can I turn it off?

Make sure you don't have any Co-authored-by field in your commit message trailer.

If you don't, report that to GitHub support, as it is most likely a bug resulting from their recent feature described above.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
2

Coming from a duplicate of mine, the steps I have taken to fix this were (in the specific case of GitExtensions and misconfiguration of my GitHub account).

In my GitHub account

enter image description here

In GitExtensions

Go to ToolsSettings and set the committer details there:

enter image description here

IN Commit (new window) → Options, you should have no Author set:

enter image description here

With this, further commits will be coming exclusively from the committer

A special thanks to @jonrsharpe and @MahdiAryayi for the pointers to the explanation.

WoJ
  • 27,165
  • 48
  • 180
  • 345