문제

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.

도움이 되었습니까?

해결책

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

git log --follow FILENAME
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top