59

I DON'T care about looking at the git history of a file that has been marked as "modified".

What I want is something akin to what WebStorm/PhpStorm have where you can select any file in your project (modified or NOT) and inspect it's git history and all the changes to that file.

I also DON'T want to have to look down the list of the git tree, and click on each one to see which files were commited.

2 Answers 2

117

You can use the fuzzy finder in GitKraken to accomplish this.

While in the repository

  • Press control/cmd + p
  • Type history
  • Enter in the filename you wish to view the history of
5
  • 23
    Just out of curiosity: How do I get there without the shortcuts ? Is that even possible ? I'd like to see a tree view of my repo at a specific time (=commit)
    – Boern
    Commented Jul 27, 2017 at 13:40
  • 9
    @Boern you can hit the history for a particular file by first selecting a commit where the file was changed and picking File History from the right click context menu on the filename. To see a tree view of the repo at a commit after you pick a commit check the View All Files checkbox. This is offered with the caveat that you probably already knew that at this point but you have a lot of upvotes on that comment (including one from me).
    – OdatNurd
    Commented May 29, 2018 at 18:23
  • 4
    @OdatNurd I have a big project with thousand of files in hundreds folders and sometimes I need to check something without the need to hunt for a commit. Loving GK but for that I reintalled git tortoise because it gives me a context menu in the file explorer I can use to inspect a file history
    – jean
    Commented Sep 27, 2018 at 16:35
  • 4
    @jean the commit panel on the right now has the ability to show the entire repo (as it was on that commit) instead of just the files changed. You can browse for files this way if the command palette isn't your style, and click on File History as described above Commented May 20, 2019 at 21:52
  • I also find it useful to do this same thing but do "Blame" instead of "History". That way you get basically the consolidated history showing how the file got to its current state, which may be more or less useful than the history view depending on the goal.
    – JamieB
    Commented Jul 18, 2023 at 16:01
10

Here's another way if you prefer to keep your hand on the mouse. Select the most recent commit, and in the right pane check the "View all files" box. Now you have a tree view of the entire repository, not just the modified files. Browse to the file of interest, right-click and select "File History".

1
  • Thank you, that was helpful and non-obvious. The History menu item doesn’t show up for a directory; is there a way to get history for one? (SourceTree manages this.) Commented Apr 8, 2021 at 21:54

Not the answer you're looking for? Browse other questions tagged or ask your own question.