git commit does not find path on linux windows subsystem (WSL)

Viewed 252

I've been trying to type git commit and get to sublime text editor on my WSL by configuring my .gitconfig file in this way:

git config --global core.editor "'C:/Program Files/sublime text 3/subl.exe' -w"

git config --global core.editor "'/mnt/c/Program Files/Sublime Text 3/subl.exe' -w"

But both paths do not work. I'm not sure what's wrong, since I get the error message that the system cannot find the path.

On .bashrc I have an alias for sublime (subl) alias subl='"/mnt/c/Program Files/Sublime Text 3/subl.exe"' that works fine though. Not sure how to prompt sublime text by committing on WSL.

When submitting git commit the editor pops up but i cannot save the commit message with following error.

enter image description here

0 Answers
Related