Git log for a specific file missing commits

Yesterday I made some changes to a file called Network.java. Today I reached out with a permutation from the origin. Now the changes have disappeared in the file. More interestingly, if I run git log -p and search Network.java, I see a commit with the changes, however, if I run git log -p -- <path to Network.java> , I don’t see my commit (it shows the committed commit a week ago).

What gives?

+4
source share
1 answer

You must run the same command with --full-history . This is because git condenses history [1].

[1] http://thread.gmane.org/gmane.comp.version-control.git/89400/focus=90659

+4
source

All Articles