I'm commiting to git using git commit -m 'commit message'
, but this only has the short description. How would I add the more detailed description using git bash?
One of the limitation in creating a Git commit description is that it is limited to 50 characters, which sometimes is not much for a breakthrough changes in our code.
Did you know you can just type git commit
and it will pop open an editor for
you to write your commit message in?
You can control which editor it is with some configuration. By default, Git
will look at $GIT_EDITOR
, then the core.editor
configuration variable, then
$VISUAL
, and finally $EDITOR
. You can look at the
git-var
man page for the search order,
and the git-config
has a little
information in the core.editor
section as well.
You can specify multiple -m
options:
git commit -m 'foo bar' -m 'baz qux'
git log
will show multiple paragraphs:
commit ...
Author: ...
Date: ...
foo bar
baz qux
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