/igit.nvim

Git intergration for neovim.

Primary LanguageLuaMIT LicenseMIT

Igit

Neovim

CI Status

Dependency

  1. plenary.nvim
  2. libp.nvim

Installation


Use you preferred package manager. Below we use packer.nvim as an example.

use {'nvim-lua/plenary.nvim'}
use {
	"ipod825/libp.nvim",
	config = function()
		require("libp").setup()
	end,
}
use {
	"ipod825/igit.nvim",
	config = function()
		require("igit").setup()
	end,
}

Usage

:IGit status            " Opens the status page (defaults with -s argument.)
:IGit status --long     " Opens customized status page.
:IGit log               " Opens the log page (defaults with  "--oneline --branches --graph --decorate=short")
:IGit log --pretty="format:%h%x09%an%x09%ad%x09%s" " Opens Customized log page
:IGit branch            " Opens the branch page (defaults with -v argument.)
:IGit branch --abrev    " Opens customized branch page.

:belowright IGit status " Opens pages with modifier.
:IGit log | tabmove -1  " Execut commands after opening the page.

:IGit push              " Execute common git commands (missing commands can be added. See :help igit-customization)

Page Mappings

See :help igit-mappings.

Highlights:

  • Interactive staging with vim diff window.
  • Rebase chains of commits in branch or log pages.
  • Add/Remove/Rename branches in branch pages just like editing files.

Customization

See :help igit-customization.

Highlights:

  • Default command name IGit is customizable.
  • Pages open command is customizable.
  • Mappings handlers takes lua functions.

Screen Shot

branch log status