How do I view a single file's history in GitK?

Stevoisiak picture Stevoisiak · Aug 28, 2017 · Viewed 10.4k times · Source

I have a git repository with a large number of files in it. At some point a bug was introduced into my program, and I have a good idea which file is causing the issue. Now I just need to track down which commit introduced the error.

How can I view the revision history for single file using GitK?

Answer

ilias picture ilias · Aug 29, 2017

To get the file history

gitk <filename>

To see the blame history in a gui, which may help you track the commit use

git gui blame <filename>