Add a commit message template

Git, Repository, Configuration · Apr 13, 2021

Sets up a commit message template for the current repository.

  • Use git config commit.template <file> to specify <file> as the commit message template for the current repository.
git config commit.template <file>
git config commit.template "commit-template"
# Sets "commit-template" as the commit message template

Written by Angelos Chalaris

I'm Angelos Chalaris, a JavaScript software engineer, based in Athens, Greece. The best snippets from my coding adventures are published here to help others learn to code.

If you want to keep in touch, follow me on GitHub or Twitter.

More like this