Tuesday, June 30, 2015

Issues with default git editor

June 30, 2015 Posted by Jason Irwin , No comments

Sublime is my editor of choice, but I guess at some point in the past I used Textmate as I recently started running into some Textmate-related issues when pulling code from GitHub. Effectively, when pulling code from GitHub for a merge. I got an error stating that the mate command could not be found.

$ git pull origin masterFrom github.com:jasonirwin/repo * branch            master     -> FETCH_HEADCan’t find TextMate.app (error -10814)error: /usr/local/bin/mate -w died of signal 6error: There was a problem with the editor '/usr/local/bin/mate -w'.Not committing merge; use 'git commit' to complete the merge.

I assumed the issue was related to my global git config or my bash profile but, after much digging, the issue was in fact caused by a GIT_EDITOR environment variable

$ echo $GIT_EDITOR/usr/local/bin/mate -w

Unsetting this variable got things working again