Git integration

Plugins

We're going to be looking at 4 plugins that bring a good integrate git experience to Neovim

Create config files

Make sure to source this file in init.vim

Configure Signify

Signify will show added, modified, or removed lines

From the documentation:

You can also stage and unstage hunks

Here's some config for changing the buffer signs

Commands

Here are the commands I use:

There are more commands but I prefer the options fugitive and gv provide

Fugitive / Rhubarb

This plugin is what we'll use for interacting with git

Note GBrowse only works when Rhubarb is installed

Note Make sure you are using git through ssh not http

Commands

GV

Commands

From the readme: "A git commit browser."

To open commit browser:

You can pass git log options to the command, e.g. :GV -S foobar.

Other options

Mappings

  • o or on a commit to display the content of it
  • o or on commits to display the diff in the range
  • O opens a new tab instead
  • gb for :Gbrowse
  • ]] and [[ to move between commits
  • . to start command-line with :Git [CURSOR] SHA à la fugitive
  • q or gq to close

Check out the repos here

signify

fugitive

rhubarb

gv


Tagged in neovim