When I try to make a Git commit with Sublime using Git Bash, I get the following error:
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.
I've tried to configure Git to use Sublime during commits by trying these different commands, without luck:
git config --global core.editor "'c:/program files/sublime text 3/subl.exe' -w"
git config --global core.editor "'C:/Program\ Files/Sublime\ Text\ 3/sublime_text.exe' -w"
git config --global core.editor "subl -n -w"
I've set up the Git Bash to open the Sublime editor, and it works perfectly fine. I've used this command to achieve that:
echo 'alias subl="C:/Program\ Files/Sublime\ Text\ 3/sublime_text.exe"' >> ~/.bashrc
I'm using Windows 10, by the way.