How do I find the most recent git commit that modified a file?

后端 未结 6 1776
北荒
北荒 2020-11-28 20:23

I want to find the most recent commit that modified a source file.

I can use git blame to see all the dates for commits by each line, but it’s difficu

6条回答
  •  孤独总比滥情好
    2020-11-28 20:53

    Once you have the SHA id of the commit you want to look at using git log FILENAME, you should be able to do git show SHA_ID_HERE to see what you did for that particular commit. You don't even need to enter the entire ID; the first 6 characters should be enough.

提交回复
热议问题