Anders Jacobsson
Anders Jacobsson

Reputation: 46

Commits are not shown properly

I have run into a git problem that I cannot explain nor find a way of fixing.

I have a repository with 15000+ files (about 650 MB) and for the last week or so, I have been losing commits, or they are at least not being shown correctly. It does not happen for each commit/push but at random (as it seems). I run git with a Stash frontend. I cannot think of any infrastructure change etc that could have caused this behavior.

If I change a file called test.xml in directory aaa/bbb/ccc and commit and push, I can at later point sometimes not see the change in either the repo clone that the change was done in or any other clone. If I do 'git log ', there is no log entry. If I do 'git log' in directory ccc, I can see the log entry and the same when in the parent directories aaa and bbb.

If I do a 'git reflog', the change is there and on the correct branch (master) and if I do 'git branch --contains ' (in any clone), it is found in the master branch.

This is all running on Windows using git 1.7.11.msysgit.1.

Upvotes: 1

Views: 110

Answers (1)

Anders Jacobsson
Anders Jacobsson

Reputation: 46

Answering my own question...

It turned out that the "lost" commits could be found by the command 'git log --follow '. Why git considered those commits to be 'renames' remains somewhat of a mystery but could possibly be explained by the changes being overwritten by a later merge commit, original changes put back in an even later commit and then again overwritten by several merge commits.

Upvotes: 1

Related Questions