I am using Ubuntu 18.04 ,I have removed previous version of sublime text through Ubuntu Software and then installed it through sublime text's official documentation given Here .

After that Whenever I am trying to git commit it gives the following message and does nothing .

git commit
hint: Waiting for your editor to close the file... 
'/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl' 
-n -w: 1: '/Applications/Sublime Text 
2.app/Contents/SharedSupport/bin/subl' -n -w: 
/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl: 
not found
error: There was a problem with the editor ''/Applications/Sublime 
Text 2.app/Contents/SharedSupport/bin/subl' -n -w'.
Please supply the message using either -m or -F option.

I want to understand what exactly this issue is and how to resolve it .my current installed version of sublime text is build 3200 . Kindly suggest a way to resolve this issue ,thank you !

  • @dessert When I gave command 'git commit -m "Initial commit" ' it didn't create any problem and gave following output 'git commit -m "Initial commit" [master (root-commit) 95d53e5] Initial commit 3 files changed, 14 insertions(+) create mode 100644 css/app.css create mode 100644 index.html create mode 100644 js/app.js ' – user716691 Mar 23 at 11:06

If an editor is set in the git config git commit called without -m or -F will try to open this editor for you to provide a commit message, which is failing in your case. You can either only commit providing a commit message

git commit -m "my commit message"

or change the configuration, e.g. remove the editor lines with

git config --unset-all core.editor

or correct the setting with:

git config --global core.editor "subl -n -w"

Further reading:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.