1

i am not sure what is causing this problem but i am having problems using git. It seems sublime is somehow interfering. Does perhaps anybody know how to solve this problem?

I am running OSX 10.9.3.

git version
git version 1.8.5.2 (Apple Git-48)

git commit -a
subl -w: subl: command not found
error: There was a problem with the editor 'subl -w'.
Please supply the message using either -m or -F option.
5
  • How are you telling git to use sublime text as an editor?
    – mmmmmm
    Oct 14, 2014 at 13:01
  • I did not tell git to use sublime. As far as i remember i installed sublime and the xcode command line utilities which i believe included git.
    – Susan
    Oct 14, 2014 at 13:05
  • What is in the [core] section of ~/.gitconfig
    – mmmmmm
    Oct 14, 2014 at 13:11
  • [core] editor = subl -w
    – Susan
    Oct 14, 2014 at 13:34
  • @Susan, please write it down as an answer. This way other people can find your solution as well. Oct 14, 2014 at 14:22

1 Answer 1

1

The issue is that git commit is trying to use an editor to allow you to create a commit message. The editor for git is possibly overridden in is set in your ~/.gitconfig file. There will be a [core] section which sets the editor

e.g. for Sublime Text

[core]
  ...
  editor = subl -w   
  ...

remove the editor line to make the default editor go back to the shell's default editor

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .