Is there a way to list all commits that changed a specific file?
Git – How to list all commits that changed a specific file
commitgit
Related Topic
- Git – How to list all of the files in a commit
- Git – How to change the author and committer name and e-mail of multiple commits in Git
- Git – How to undo the most recent local commits in Git
- Git – How to find and restore a deleted file in a Git repository
- Git – How to make Git “forget” about a file that was tracked, but is now in .gitignore
- Git – How to list only the names of files that changed between two commits
- Git – How to determine the URL that a local Git repository was originally cloned from
Best Answer
The
--follow
works for a particular fileDifference to other solutions given
Note that other solutions include
git log path
(without the--follow
). That approach is handy if you want to track e.g. changes in a directory, but stumbles when files were renamed (thus use--follow filename
).