Navigate Git branches with Vim-Flog

Flog + Fugitive provides powerful Git branch navigation

Flog is an extension to the every-popular Fugitive that allows easy Git branch viewing and commit history navigation inside of Vim.

It’s incredibly easy to use: powerful yet simple to navigate. After installing, simply open the commit history with :Flog. What you’ll see is a visual representation of the commit history and branches, similar to using the --graph option on git log:

From here, there are a number of useful commands and options. I found gm to be useful for navigating a linear history because it hides merge comments. To see all options, use g?. To open a commit to see its commit message and diff, just hit enter on them, <CR>. From there, you can toggle through to the next and previous with <C-N> and <C-P>.

All in all, Flog is a very useful plugin and one I will add to my daily arsenal.


Was this useful? Help us improve!

With your feedback, we can improve VimTricks. Click a link to vote: