Nat Ritmeyer Nat Ritmeyer - 1 year ago 122
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 Source

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

git config --global core.editor /usr/bin/vim
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download