1

I'm trying to commit my changes locally i.e. using git commit command.
It launches the Sublime editor successfully, where one can enter the desired message for the commits.

Failed Attempts to add Personal Messages and Commit via Sublime editor

My git terminal remains stuck and receives no input from the Sublime editor, even after I enter the desired message, save it and close the editor!

I can successfully commit using this command: git commit -m "my_desired_message"

Is there a way to use SublimeText to enter my commit message?

2
  • Type this command in a repo git config core.editor. What is the output? Commented Mar 7, 2017 at 16:01
  • @DivyanshuKushwaha 'C:/Program Files/Sublime Text 3/sublime_text.exe' -n -w This is the output, thanks! Commented Mar 7, 2017 at 16:02

1 Answer 1

1

I've seen in some discussions that there are problems with commits on Sublime if it's already open.

Do you already have Sublime open when you enter git commit?

Try this to see if it works.

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

Associating text editors with Git -n will open a new instance of Sublime. -w will make the git wait for you to close Sublime before proceeding.

Let me know if either of those two work.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.