I'm testing the Visual Studio Code's source control, and I recklessly hit the "Commit" button; now it's waiting for me to enter the commit message:

It is like a loading or waiting motion. It's waiting for me to enter the commit message.
Is there a way to cancel and terminate the whole commit process in this situation?
There should be buttons at the lower right of the editor now to commit or cancel drafting the commit message. See the release notes and docs.
I just want to point out that the message itself (the one in the editor, and which is shown in your screenshot) is pretty instructive, though maybe not obvious:
an empty message aborts the commit.
Close the editor tab with an empty message (no need to touch the commented lines). You can close the commit message editor tab using ctrl/cmd+w, or middle click the tab handle, or click the "x" button on the tab handle.
The same goes for any other commit message editor program other than VS Code. Ex. vim or whatever you've configured as your default commit editor. I'm pretty sure it's just how Git itself processes commit messages from a file- not specific to any editor like VS Code.
Related readings if you want to learn deeper: git commit --template, How to specify a git commit message template for a repository in a file at a relative path to the repository?, What is VS Code's "new git grammar" in the v1.76 release notes?.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With