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/
1. Create a file with your custom template inside your project directory.
In this example in the .git/
folder of the project :
$ cat << EOF > .git/.commit-msg-template
> My custom template
> # Comment in my template
> EOF
2. Edit the config
file in the .git/
folder of your project to add the path to your custom template.
With git command :
$ git config commit.template .git/.commit-msg-template
Or by adding in the config file the following lines :
[commit]
template = .git/.commit-msg-template
Et voilà !