Search code examples
gitmsysgit

git is showing someone else's commits as my commits


We're two programmers working off of a "central" git repository. We're both pushing to the same "master" branch on the central repository.

Yesterday I pushed a bunch of commits and the other programmer later pulled them.

Now git is showing him all of my commits from yesterday as out commits ready to be pushed from his machine to the central repository.

We're not quite sure how to handle this, and I haven't found any discussions on similar situations.

Note that we're both on Windows, using GitExtensions, TortoiseGit and msysgit 1.6.5.1. The central repository is on ProjectLocker.


Solution

  • Did you do a git log on your friend's machine and check if git really thinks that they are his commits? Actually, I think all that has happened is that he made some diverging commits before he pulled your code into his local repository. It means that when he pushes from his machine to the central repository, the history of the central repository will be altered to look like the out commits that you are seeing.

    Please do a git log to see the commit author for each of the commits.