11

How do I git commit my changes in VS Code without any message?

In the terminal I used --allow-empty-message -m ''. I used to be able to do what I wanted in VS Code by entering one space character, but that is no longer working.

2
  • I had trouble before but couldn't It may only be that I don't know Commented Nov 19, 2019 at 1:01
  • please try answer. Commented Nov 19, 2019 at 2:52

3 Answers 3

1

This works in VS code version 1.64.2.

Open the command pallette (Ctrl+Shift+P on PC or Cmd+Shift+P on a mac) and type in commit empty, select the Git: Commit Empty command. A text box will appear to add a commit message.

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

1 Comment

The question asks for a commit with no message, not an empty commit with a mandatory message. Your solution still asks for a message, and not providing it will cancel the commit operation.
1

Supposing you are using the built-in git client.

You should use the VSCode "TERMINAL" tab with a git aware terminal. It is not possible to do it with the GUI since it forces you to enter a message (that can be empty). Stage your modifications.

Then type in your terminal:

git commit

without the -m option.

If the git repository expects a message, an editor window should appear asking you for one.

Comments

0

I tried this on my machine with latest VS Code(1.79.2). I am able to commit by just adding a space in message box.

vs code version details

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.