Reputation: 123
A few days ago I tried to configure Sublime Text 3 so that it would open when I did commit in git, but an error always comes out, and when I try to put back the vim I get this:
MacBook-Air-de-Andres:bin andr3yvlz$ git config --global core.editor vim
warning: core.editor has multiple values
error: cannot overwrite multiple values with a single value
Use a regexp, --add or --replace-all to change core.editor.
i try to do this too:
MacBook-Air-de-Andres:bin andr3yvlz$ git config --replace-all core.editor vim
fatal: not in a git directory
MacBook-Air-de-Andres:bin andr3yvlz$
The commit error is:
MacBook-Air-de-Andres:Andr3yvlz andr3yvlz$ git add .
MacBook-Air-de-Andres:Andr3yvlz andr3yvlz$ git commit
hint: Waiting for your editor to close the file... 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.
MacBook-Air-de-Andres:Andr3yvlz andr3yvlz$
if someone knows how to configure the sublime with git, it would be very helpful, and thanks in advance
Upvotes: 1
Views: 466
Reputation: 7402
You can try to remove the option code.editor
from ~/.gitconfig
and than add it.
$ git config --global --unset-all core.editor
$ git config --global core.editor "vim"
Upvotes: 2