1

Edit: Not cool to site command line questions and mark as duplicate when this question was specifically concerning GUI solutions. Original question below.

I'm looking for a GUI that can help me view the commit history for a single file in a git repo. Something roughly equivalent to git log --follow filename but with more features.

Does there exist a software GUI for this purpose? Like a diff viewer with a forward/back button to explore the history of a file? I'm currently using GitHub.com code history section for this, but it's not super convenient and requires opening links then going back to the previous page to find the next/previous commit for a file.

Roci
  • 113
  • 3
  • 10
  • Is it answered [here?](https://stackoverflow.com/questions/278192/view-the-change-history-of-a-file-using-git-versioning) – Alexander Dmitriev Jun 23 '18 at 16:23
  • [One of the answers](https://stackoverflow.com/a/17955109/2047843) in the question posted by @AlexanderDmitriev explains how to do this with SourceTree, which is what I use. – chipit24 Jun 23 '18 at 16:25
  • I have found that just using `git log`, in conjunction with a good Git IDE plugin (e.g. IntelliJ), works just fine for me. – Tim Biegeleisen Jun 23 '18 at 16:33
  • I don't think this is a duplicate question, people. This question is about GUI solutions. Yes, the answer is Sourcetree, but none of the questions linked here were concerning GUI for exploring diff history for a single file (very specific question). – Roci Jun 23 '18 at 19:52

1 Answers1

2

You can open gitk and pass a single file as a parameter.

gitk somefile.cc

This will open the gitk gui and you will be able to click all commits where the file was updated and see the diff vs previous commit.

Martin G
  • 17,357
  • 9
  • 82
  • 98