How to Set a Default Commit Message

Having a default commit message is really useful for a number of reasons

Mar 02, 2020
  • It can formalize your commit messages
  • It serves as a good reminder for the information you should add to your commit message, like issue number
  • If you set it to "ughhhh, don't accept this"

To set a default commit message on your local machine, start by executing the following from command line:

git config --global commit.template ~/.gitmessage

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.