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.
Use git log --all <filename> to view the commits influencing <filename> in all branches. Show activity on this post. Assuming the package "gitk" is already installed.
On GitHub.com, you can access your project history by selecting the commit button from the code tab on your project. Locally, you can use git log . The git log command enables you to display a list of all of the commits on your current branch. By default, the git log command presents a lot of information all at once.
git log -p command displays the patch representing each commit.
Try this:
git log --all -- path
You can use gitk
gitk --all <path to file> (you need to install gitk)
e.g.
gitk --all -- /home/kit.ho/project/abc.txt
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With