How to specify a git commit message template for a repository in a file at a relative path to the repository?

git

Solution

This blog tipped me off that if the path to the template file is not absolute, then the path is considered to be relative to the repository root.

git config commit.template /absolute/path/to/file

or

git config commit.template relative-path-from-repository-root

Problem

Is there a way to specify a git commit.template that is relative to a repository? For configuration an example is ``` $ git config commit.template $HOME/.gitmessage.txt ``` But I would like to specify a template file relative to the .git folder of the repository.

Original source

Related problems