Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Merging commits from the same user appearing twice on GitHub

Tags:

git

github

Noticed my name appears twice on my repository,on GitHub updates you see my GitHub profile and only my commits on the website which is editing readme. On the other name(which still is mine) you see my git updates from the computer.

How can i merge the two since they all belong to me. Here is a sample. So far my code contributions are not visible on the contribution page. Here is the link, how can i fix this.

enter image description here

like image 410
Madona wambua Avatar asked Feb 23 '18 00:02

Madona wambua


People also ask

Why does Github say my name twice?

In your case you may have made the commit using Git configured with the same name but a different email address; Github will consider these to be different people. This can happen if you work on the same project on different machines and do a rebase.

Does merging create an additional commit?

As you can see, both merge and rebase will eventually cause that changes from both branches being combined to a particular branch. One creates an additional merge commit, the other modifies the history to make it flat and transparent. Rebase usually causes more conflicts than merge.

What happens if two people git push at the same time?

If server detects a conflict when someone pushes data (and if two users are doing this "simultaneously" one of the pushes will be conflicting, because it will be applied only after the other one completes), the server will reject it, and the unlucky user shall then resolve conflicts and try to push again.


1 Answers

Those commits are not linked to your GitHub user.

From the official GitHub help article:

If your commits are not linked to any user, we will display the grey Octocat logo beside them.

To check the email address used for those commits and connect commits to your account, take the following steps:

  1. Navigate to the commit by clicking the commit message link.
  2. To read a message about why the commit is not linked, hover over the blue to the right of the username:

enter image description here

Unrecognized author (with email address): If you see this message with an email address, it means the address has not been added to your account settings. To link your commits, add the email address to your GitHub email settings.

Unrecognized author (no email address): If you see this message without an email address, it means you used a generic email address that can't be added to your email settings. You will need to set your commit email address in Git, then add the new address to your GitHub email settings to link your future commits. Old commits will not be linked.

Invalid email: This means the email address in your local Git configuration settings is either blank or not formatted as an email address. You will need to set your commit email address in Git, then add the new address to your GitHub email settings to link your future commits. Old commits will not be linked.

If there is comment, you can try associating your commits with your GitHub username using git config --global user.email "[email protected]". The email address must be the same for Git and GitHub. Also note that this will only work for future commits. For past commits, you can re-commit if needed with:

git reset --soft HEAD
git config --global user.email "[email protected]"
git commit -c ORIG_HEAD

Also, please actually require your admins to approve Pull Requests, (rather than just suggesting that the public don't push to your master branch without doing so). By leaving Pull Requests open to be merged by the public, you're opening yourself to all sorts of malpractice.

like image 108
Obsidian Age Avatar answered Oct 12 '22 22:10

Obsidian Age