Reputation: 13051
After running git commit
an editor opens and there a template for the commit message:
<empty line where the messgae should come>
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# On branch mybranch
# Your branch is up to date with 'origin/mybranch'.
#
# Changes to be committed:
# new file: README.md
# deleted: README.rst
# modified: foo.txt
#
# Untracked files:
# bar.txt
#
Then a common practice is to provide a short one-liner, an empty line and a longer optional description of the commit. When using vscode I noticed that git: commit
only allows one line message (enter
is actually the committing).
Is there some command in vscode which opens a new buffer with the template known from the CLI of git and upon saving(!) of this new buffer the commit will happen?
Upvotes: 1
Views: 10176
Reputation: 2805
There are a few ways to git commit
in VS Code:
git commit
without message will give you template message in your default editor. It's vi usually, but you can configure git to use any editor. Upvotes: 3