Back

Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in DevOps and Agile by (29.3k points)

Is there a way to list all commits that changed a specific file?

1 Answer

0 votes
by (50.2k points)

To list all the commits

Refer: https://git-scm.com/docs/git-log#Documentation/git-log.txt---follow

From the documentation use --follow option to list all commits

git log --follow --filename

Note: 

You might see some are using a git log path. But that approach is handy if you want to track, but stumbles when files were renamed. So we suggest you use --follow option to follow the file name and list all commits that changed a specific file.

Welcome to Intellipaat Community. Get your technical queries answered by top developers!

28.4k questions

29.7k answers

500 comments

94.1k users

Browse Categories

...