This config uses Neogit as the Git UI (replacing Fugitive) and Diffview for diffs + merge conflict resolution.
\<leader>gs→ open Neogit status\<leader>gd→ open Diffview\<leader>gD→ close Diffview\<leader>gh→ Diffview file history\<leader>hp→ preview hunk (Gitsigns)
Open status: \<leader>gs
Common keys in the status buffer:
sstage item under cursorSstage all unstageduunstage item under cursorUunstage all stagedxdiscard item under cursor<c-r>refreshcopen commit popup (then pick an action)
From Neogit status (\<leader>gs):
mopens the merge popup (merge actions)ropens the rebase popup (rebase actions, continue/abort when in progress)
Neogit shows the available actions/keys in the popup window; follow those prompts.
When you have conflicts, open Diffview: \<leader>gd and select a conflicted file.
In Diffview’s merge tool:
- Next/prev conflict:
]x/[x - Choose for the current conflict:
\<leader>co= choose ours\<leader>ct= choose theirs\<leader>cb= choose base\<leader>ca= choose all (keep both)dx= delete conflict region
After resolving:
- Save (
:w) - Stage in Neogit (
\<leader>gs, thens/S) - Use Neogit’s rebase popup (
r) to continue, or commit (viac) if you’re finishing a merge.
- Undo an edit:
u(redo:<c-r>) - Undo a conflict choice you just applied:
u - Discard file/hunk from Neogit status:
x - Abort an in-progress rebase/merge: use the
r/mpopup actions (Neogit will show “abort/continue” options when applicable).