This is the template I came up with to help me improve the quality of my commit messages by using a template.
Use as a default template: Better Commit Messages with a .gitmessage Template
Use in prepare-commit-msg
git-hook: Atlassian: Git Hooks
Use as a template for a repository:
- Save the template in the repository as
.gitmessage
. (Use your own naming if you wish.) - In your terminal, cd to the project root.
- Run
git config commit.template '<path>/.gitmessage'
. Replace path with the relative path to the directory for the template. - Use
git commit
without the-m
option to make a commit with the template.