Git: How to distinguish two different files in different commits?

I have a repository in which several files have been renamed from .html to .php and subsequently edited in a number of transactions since my last attraction. Using git diff, you will see all the content htmland the content has been added php. Is there a neat way to git diffhave rename detection (something like git log --follow) or directly compare different file names in different commits (something like a solution in Git: How to split two different files in different branches? But for commits)?

+4
source share
1 answer

You can always compare 2 files in two different commits:

git diff commit1:file1_path commit2:file2_path
0

Source: https://habr.com/ru/post/1673282/


All Articles