1

i have created a new local repository and initialize it, then i define ST3 as default editor

git config --global core.editor "'C:\Program Files\Sublime Text 3\sublime_text.exe' -w"

and when i commit i got this error

hint: Waiting for your editor to close the file... Skipping command-line '"C:\Users\Sony\bin\..\usr\bin\bash.exe"'
('C:\Users\Sony\bin\..\usr\bin\bash.exe' not found)
Need a valid command-line; Edit the string recources accordingly
error: There was a problem with the editor ''C:\Program Files\Sublime Text 3\sublime_text.exe' -w'.
Please supply the message using either -m or -F option

1 Answers1

1

Try instead, as shown here:

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

This is also documented by GitHub.

It will work better when done from a CMD (instead of a bash session) because of the way the quotes (simple and double) are interpreted.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250