1

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.

But:

  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.

Machavity
  • 30,841
  • 27
  • 92
  • 100
klm123
  • 12,105
  • 14
  • 57
  • 95

1 Answers1

2

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

git log --follow FILENAME
Michał Wróbel
  • 684
  • 4
  • 10