Here is one problematic file I found. When the blame view is clicked this page is given, when I take a look in to the history of the same file, it does not contain all the commits as shown in the blame view for the same file. For example the commit ce1b694d4a06425f933dfee5e0966349fdb9581d
which added the lines from 40 to 52 is not shown in the history of the same file. What is the reason for this? Thanks in advance

- 3,956
- 8
- 38
- 58
1 Answers
The earliest commit shown in the file's history was a refactoring, during which the file was moved. The commit you see in the blame
output is from before the file moved.
The history will have been generated using a command like git log -- /components/org.wso2.analytics.apim/pom.xml
, which doesn't follow file moves.
You can tell git (at the command line) to provide a history that does follow file moves by saying git log --follow -- /components/org.wso2.analytics.apim/pom.xml
, which I've verified does show the ce1b69 commit.
(As an aside, by default git log
also presents a simplified history. I can't think of an obvious reason why this would omit a commit that shows up in blame
, but if two branches both introduced the same range of lines I would suppose it could be possible. Adding --full-history
to the log would remedy that, if ever you were to encounter it.)

- 42,148
- 4
- 35
- 52
-
1Note that support for viewing more complete history on the github site isn't all you might hope for... See http://stackoverflow.com/questions/17213046/see-history-in-github-after-folder-rename – Mark Adelsberger Feb 21 '17 at 14:07