How can I change the default comments in the git commit message?

There is commit.template configuration variable, which according to git-config(1) manpage:

Specify a file to use as the template for new commit messages. “~/” is expanded to the value of $HOME and “~user/” to the specified user’s home directory.

You can put it in per-repository (.git/config), user’s (~/.gitconfig) and system (/etc/gitconfig) configuration file(s).

Leave a Comment