Why is vim fugitive called a Git wrapper?
Fugitive is the premier Vim plugin for Git. Or maybe it’s the premier Git plugin for Vim? Either way, it’s “so awesome, it should be illegal”. That’s why it’s called Fugitive.
Which is the crown jewel of the fugitive program?
The crown jewel of Fugitive is :Git (or just :G ), which calls any arbitrary Git command. If you know how to use Git at the command line, you know how to use :Git. It’s vaguely akin to :!git but with numerous improvements: The default behavior is to directly echo the command’s output.
Is there a Git checkout variant of gread?
:Gread is a variant of git checkout — filename that operates on the buffer rather than the file itself. This means you can use u to undo it and you never get any warnings about the file changing outside Vim.
How to blame a commit in git blame?
:Git blame uses a temporary buffer with maps for additional triage. Press enter on a line to view the commit where the line changed, or g? to see other available maps. Omit the filename argument and the currently edited file will be blamed in a vertical, scroll-bound split.
How to use visual mode in vim fugitive?
Mappings visual mode to operate on multiple files or partial hunks. s Stage (add) the file or hunk under the cursor. u Unstage (reset) the file or hunk under the cursor. – Stage or unstage the file or hunk under the cursor. U Unstage everything. X Discard the change under the cursor. This uses `checkout` or `clean` under the hood.
What are the commands for Git in Vim?
:Git commit, :Git rebase -i, and other commands that invoke an editor do their editing in the current Vim instance. :Git diff, :Git log, and other verbose, paginated commands have their output loaded into a temporary buffer.
How to diff against all direct ancestors in Vim?
:Gdiffsplit! Diff against any and all direct ancestors, retaining focus on the current window. During a merge conflict, “theirs” ancestors. Additional d2o and d3o maps are “theirs” ancestor, respectively.