My current gitmessage template

:: dev

By: Maciej Barć

It is possible to configure git to use a extra helpful git message when inside the git commit editor.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
#
# When committing follow those rules:
#   1. Use the Conventional Commits style when committing!
#      Follow this template:
#        > <type>[optional scope]: <description>
#        >
#        > [optional body]
#        >
#        > [optional footer(s)]
#      Allowed commit types are:
#        fix, feat, build,
#        chore, ci, docs,
#        style, refactor, perf,
#        test.
#      See also: https://www.conventionalcommits.org/en/v1.0.0/
#   2. Remember to add a "Signed-off-by"!
#      For example:
#        > Signed-off-by: John Smith <js@js.org>
#

Save that as .gitmessage on repo root.

Then wire it to local git config with:

1
git config --local commit.template .gitmessage

See also: