A git plugin for vim with shortcuts and commands for dealing with the most common operations.
GstatusOpens git status in a split window where files can be added, reset and checked out.GbranchShow the current branch.GbranchesShow all branches and switch between them.GcreateBranchShow all branches and create a new one.GdeleteBranchShow all branches and delete one.GdiffOpen a split window with the diff of the current file in the working tree.GdiffAllOpen a split window with diffs of all files in working tree.GdiffStagedOpen a split window with the diff of the current file in the staging area.GdiffStagedAllOpen a split window with diffs of all files in the staging area.GdiffUpstreamOpen a split window with diffs between the upstream branch and the current branch.GlogOpen a split window showing thegit logof the current file.GlogAllOpen a split window showinggit logfor all files.GlogUpstreamOpen a split window showing thegit logbetween the upstream branch and the current branch.GcommitOpen a split window with the commit message. If the commit message is written commit the staging area. If no changes are staged for commit, open the status window.GcommitAmendSame as Gcommit but do agit commit --amendGpullRungit pullGpushRungit pushGreviewDo a commit against gerrit.GstashStash the current working tree and reopen any buffers showing files in the current repository.GstashPopPop the top of the stash stack and reopen any buffers showing files in the current repository.
gs Gstatus
gb Gbranch
gB Gbranches
gc GcreateBranch
gT GdeleteBranch
gd Gdiff
gD GdiffAll
gj GdiffStaged
gJ GdiffStagedAll
gu GdiffUpstream
gC Gcommit
gA GcommitAmend
gl Glog
gL GlogAll
g; GlogUpstream<CR>
gp Gpull
gP Gpush
gR Greview
gk Gstash
gK GstashPop
The shortcuts aren't prefixed with <leader>. If you want to change this, they are listed at the bottom of the plugin source. Simply add <leader> to the shortcut if you prefer.
GiddyTrackingBranch If set this will be used when creating branches as the name of the remote tracking branch. For example
:let GiddyTrackingBranch="origin/master"
GiddyScaleWindow If set this value will be multiplied by the number of lines in the current window to calculate the size of the git split window. The default value is 0.5 (max: 1).
To install giddy, download installer/giddy.vmb or clone the whole repository, though you only need giddy.vmb. Then run the vimball:
vim installer/giddy.vmb
:so %
:q