Git commit does not open editor

I have a problem in which whenever I run git commit, this is displayed:

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

sublis an alias for the exalted. I am running git bash on win10.
If I just run, ' subl' it opens the editor without problems, but with git commit it is not. Here is my git config file:

[core]
    editor = subl -w -n
+4
source share
3 answers

Follow git config --global core.editor "\"C:\Program Files\Sublime Text 3\sublime_text.exe\" %*"to configure Sublime as your editor on Windows.

EDIT: The above assumes you have Sublime 3 installed. If you have Sublime 2 installed, change the full path to the correct valid path to sublime_text.exe.

+4
source

- , . , - , git.

find -exec, xargs sudo.

-, , script.

+2

subl /usr/local/bin/subl . , which subl .

, , git, .

+1

Source: https://habr.com/ru/post/1648077/


All Articles