Git: Fixing “error: There was a problem with the editor ‘vi’.”

I just installing vim on my machine, but it affected to my installed git. Every I merge my working branch, I always got this error.

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

After that, I have to commit manually to the merged changes.

$ git commit "merge from ... to ..."

The error because git using “vi” as the editor and I installed “vim” in my machine.
Here is how to fix this.

$ which vim
/usr/local/bin/vim
$ git config --global core.editor /usr/local/bin/vim

Reference: http://tooky.co.uk/there-was-a-problem-with-the-editor-vi-git-on-mac-os-x/

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s