0

I am trying to set up git on my terminal, and need it to open up Sublime text when I use a git commit command, so that I can add a note to my commits. If I type "subl" sublime opens up fine, however when I type git commit the following error message comes up

hint: Waiting for your editor to close the file... '/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl' -n -w: /Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl: No such file or directory 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 have been following a Udacity git and github course which explains set up.

I am wanting sumblime text editor to open so I can type a note for my commits. However instead it is asking that I use -m to type a note which isn't always going to be convenient.

CThomas
  • 179
  • 1
  • 10
  • 3
    Possible duplicate of [How can I make Sublime Text the default editor for Git?](https://stackoverflow.com/questions/8951275/how-can-i-make-sublime-text-the-default-editor-for-git) – phd Apr 23 '19 at 19:13
  • https://stackoverflow.com/search?q=%5Bgit%5D+%5Bsublimetext%5D+default+editor – phd Apr 23 '19 at 19:13

2 Answers2

0

You have to set up sublime text 3 as your default editor through the terminal.

run this: git config --global core.editor "subl -n -w"

  • This was already answered on stackoverflow. https://stackoverflow.com/questions/8951275/how-can-i-make-sublime-text-the-default-editor-for-git – marcogmonteiro Sep 30 '20 at 21:02
-3

"Waiting for your editor to close the file... error" how to fix this problem on mac M1 pro .on git config --global core. editor "code --wait"

Xmuluneh
  • 11
  • 1
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Amit May 04 '22 at 14:19
  • If you have a new question, please ask it by clicking the [Ask Question](https://stackoverflow.com/questions/ask) button. Include a link to this question if it helps provide context. - [From Review](/review/late-answers/31688361) – snakecharmerb May 09 '22 at 17:55