Save the file
Start a new git repo (use ':!' + any command you like)
Code and commit your heart out without ever leaving Vim
That should be :!git init etc.
@manveru correct! fixed
For git in vim: https://github.com/tpope/vim-fugitive
@vimrocks Have it installed ;) I sometimes just find this way a little easier for machines I don't use often (or servers I don't have fugitive installed on)
You can also type :sh to obtain a full shell. When you've done type exit (or Ctrl+d) to come back in vim