2

I'm working my way through a git tutorial and ran into a problem when trying to use git revert. Anytime I try to use the git revert command I receive the following message:

sublimetext -wl1: sublimetext: command not found
error: There was a problem with the editor 'sublimetext -wl1'.
Please supply the message using either -m or -F option.

I'm using SublimeText 2.0.2, bash, and a macbook.

I'm probably missing something very simple but I haven't been able to find any documentation addressing this issue so far.

Thanks for your help :)

zfisch
  • 21
  • 7
  • You likely have set the editor Git uses for commit messages incorrectly. Try doing `git config -g --unset core.editor`. – poke Jan 07 '14 at 22:17
  • Is this the preferred way to setup a text editor for bash? I haven't done any previous bash configuration besides assigning a name and email for git. – zfisch Jan 07 '14 at 22:20
  • Tried @poke's suggestion anyways, received ``error: unknown switch `g'``. – zfisch Jan 07 '14 at 22:32
  • 3
    Oops, it’s actually `git config --global --unset core.editor`. Anyway, this will unset the configuration for the editor Git will use, so it will give you *vim* as an editor as default. If that works then, you can see what you can do to correctly set up sublime text as the editor for Git. – poke Jan 07 '14 at 22:36

0 Answers0