Alan Quigley Alan Quigley - 2 months ago 7x
Git Question

Setting up sublimetext 3 as git commit text editor

I'm having trouble setting up sublime as my git commit message editor.

git config --global core.editor "subl"

error: cannot run subl: No such file or directory
error: unable to start editor 'subl'
Please supply the message using either -m or -F option.

subl work perfectly otherwise.


You can solve this by putting in a full path

git config --global core.editor "/Applications/Sublime -n -w"

Source: OXS Commandline

EDIT: If the name of the app is not Sublime you will want to replace that with the correct name.