To culminate the answers here are the ways to accomplish this:
Vanilla Terminal Vim
Press CTRL-Z in normal mode will drop you back in to the shell and suspend Vim. After executing your
git checkout [branchname] type the
fg command to return to the suspended Vim which will also force Vim to refresh.
Vanilla GUI Vim
Some gvim implementations will have
:shell support which will open a shell inside of Vim using a dumb terminal. However it may be easier to just type:
:!git checkout [branchname]
This will execute the command without having to open a new shell prompt. (This option is also usable in the terminal Vim).
vim-fugitive is a plugin that allows you to use Git from within Vim. The command would be:
:Git checkout [branchname]
vim-merginal is a plugin that uses vim-fugitive and provides a user friendly-ish interface.
- Move cursor to the branch you want.
cc to check out that branch.