57

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.

LazyOne
  • 158,824
  • 45
  • 388
  • 391
Brian Schermerhorn
  • 1,361
  • 1
  • 15
  • 22

2 Answers2

114

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
Stephen Higley
  • 1,164
  • 1
  • 8
  • 2
  • 21
    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 Jul 27 '17 at 13:40
  • 8
    @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 May 29 '18 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 Sep 27 '18 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 – Chuck Dries May 20 '19 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 Jul 18 '23 at 16:01
9

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".

Todd Menier
  • 37,557
  • 17
  • 150
  • 173
  • 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.) – Flash Sheridan Apr 08 '21 at 21:54