Using Neovim as Git Diff Tool
Configuration
Add this to your .gitconfig:
# Using nvim as diff tool
[difftool]
prompt = true
[diff]
tool = nvimdiff
[difftool "nvimdiff"]
cmd = "nvim -d \"$REMOTE\" \"$LOCAL\""Usage
git difftool
git difftool HEAD~1
git difftool branch1..branch2What This Does
Opens Neovim in diff mode with two panes
$REMOTE- will be displayed in the right pane$LOCAL- will be displayed in the left paneprompt = true- asks before opening each file