Reputation: 6793
This question is closely related to List all commits for a specific file however it is different. I want to find out which commits, across all branches, had modified a given file.
To make it more complex, the given file may or may not be in the working tree.
Upvotes: 119
Views: 45169
Reputation: 2795
Command line
I would highly recommend to add the graph option with git log:
git log --graph --all -- <filename>
Gui
Gitk is an pretty old tool and not always installed, I recommend a different free tool like e.g. SourceTree:
Upvotes: 58
Reputation: 26968
You can use gitk
gitk --all <path to file> (you need to install gitk)
e.g.
gitk --all -- /home/kit.ho/project/abc.txt
Upvotes: 56