Nat Ritmeyer Nat Ritmeyer - 2 months ago 18
Git Question

Using vim for git commit messages broken after updating janus

After updating the janus vim distribution there appears to be a problem with using vim for commit messages. The best example of this is when doing a

git pull
to get someone else's changes. The vim editor is displayed, I type my commit message, I enter :wq but instead of the commit working, I get the following error message:

error: There was a problem with the editor 'vi'.
Not committing merge; use 'git commit' to complete the merge.


I then have to manually commit :(

How do I get git to play nicely with vim?

Answer

After a bit of googling, it turns out that the answer is to run the following:

git config --global core.editor /usr/bin/vim
Comments