Include the next line in your gitconfig
or .gitconfig
profile you are using:
[commit]
template = ~/.gitCommitTemplate
# If it is not a relative path and is in the same directory
# template = .gitCommitTemplate
If you are using a relative path or profile, you can use this as example:
# For profiles, remove the line if you do not use different Git profiles settings (eg. D: disk)
# [includeIf "gitdir/i:D:/Projects/Codeberg/"]
template = .gitCommitTemplate
# or
template: D:/git/etc/.gitCommitTemplate
Note: For Windows you need to use
/i:
in the path.
If you want this template to be global in Git, use the following code in console:
$ git config --global commit.template ~/.gitCommitTemplate