I am learning the basics of Git and have run into an issue while trying to use Sublime 2 as my default text editor for commit messages.
I am using a Mac and the Sublime text editor(Version 2.0.2, Build 2221)
As per instructions on help.github I used the following line:
git config --global core.editor "subl -n -w"
However, when I attempt a git commit
command I get the following message:
subl -n -w: subl: command not found
error: There was a problem with the editor 'subl -n -w'.
Please supply the message using either -m or -F option.
I know that subl
and subl -n -w
work as I have tried them in isolation and they launch the editor. So the issue must be when the editor is opened from the git commit
command.
I have looked at the questions and answers from 1, 2 & 3 and attempted the solutions but haven't been able to resolve my issue.