Take the tour ×

I have file in git and want to check it's history: commits when it was changed and what exactly was changed between this commits.


  1. I know that I have renamed the file in the past git history
  2. May be even have moved between directories.

What is the easiest way to check what I want to check?

P.S. I know about this question: git diff on moved file?, but there is not answer what to do if you have a bad memory and don't remember all previous file names.

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

To check the history of a file even across file moves or renames it's best to use:

git log --follow FILENAME
share|improve this answer
and I found command like "git diff HEAD^^^^ HEAD --follow FILENAME". Very nice. Thanks. –  klm123 Aug 18 '12 at 17:41
add comment

Your Answer


