Using Git from Vim
From Vim Tips Wiki
created February 3, 2009 · complexity basic · author Alecclews · version 7.0
Git is a distributed version control system, which you can use directly from Vim with some help from plugins:
- vim-fugitive (status unknown). Help text is provided.
- git-vim (included with Vim 7.1 and later). Provides ftplugin and syntax files for editing various git files (e.g. commit messages).
- fastgit.vim (not updated since 2009).
- VCScommand plugin that needs to be installed separately. This provides commands to interact with git. Help text is provided.
- gitv is a 'gitk clone' plugin.
- vimagit is an attempt to reproduce the magnificent emacs Magit plugin to vim. The main idea is to manage all git operations in one single buffer, as efficiently as possible.
- vim-gitgutter plugin which shows a "changed" indicator based on git diff in the gutter (sign column). It can also stage or revert hunks. Also see the similar Signify plugin.
Git supports using vim diff to resolve merge conflicts
git mergetool -t vimdiff
To make it the default merge tool across all your repos
git config --global merge.tool vimdiff