I was trying to create a commit template, but when I do a commit I get this message
fatal: could not read 'templates/commit-template.txt': No such file or directory
I follow the next steps to create the commit template:
- I create a new folder named templates, inside git folder
- I create an archive commit-template.txt inside de folder templates
In gitbash I typed the following:
$ git config --global commit.template templates/commit-template.txt
I reviewed the config and I saw this, it seems ok :(
commit.template=templates/commit-template.txt
core.repositoryformatversion=0
But when I have tried to do a commit I received the message I wrote before (fatal: could not read 'templates/commit-template.txt': No such file or directory)
I have read about commit template in a book and I followed the instrucción, but I don´t know what am I doing wrong. I found some informaticon on the links below(and other more), but I am still lost. Could someone help me please.
Custom Git Commit Message Template
https://git-scm.com/docs/git-config
https://thoughtbot.com/blog/5-useful-tips-for-a-better-commit-message