Earlier this week I wrote about Fork Gist to Repo on GitHub β Stack Overflow and found out the example is about the git configuration variable commit.template which was completely new to me.
So below are a few links as it is a very cool feature!
Basically it is a pointer/softlink to a template file that has the initial commit message (the config can either be per repository or global).
Links (most viaΒ [Wayback/Archive] “commit.template” “git” – Google Search):
- [Wayback/Archive] .gitmessage: Use this Git commit message template to write better commit messages.
- [Wayback/Archive] Use a Git commit message template to write better commit messages which is impressive as it basically separates out (very good) documentation and template.
- It has quite a few [Wayback/Archive] Forks Β· git-commit-template.md, but at the time of writing none do add new commits except one which translated the markdown into Japanese and moved it into the
.gitmessagetemplate file:
It also as a lot of cool links (partially from the comments):
- [Wayback/Archive] Better Commit Messages with a .gitmessage Template
- [Wayback/Archive] Add co-authors to Git commits
- [Wayback/Archive] joelparkerhenderson/git-commit-template: Git commit template for better commit messages which is interesting because of the added fields, but less useful because it packs all the documentation in the commit template ([Wayback/Archive] git-commit-template/git-commit-template.txt at main Β· joelparkerhenderson/git-commit-template) making the template harder to use.
- [Wayback/Archive] Create A Custom Git Commit Template | by Alex Wasik | Medium
- [Wayback/Archive] conventional-changelog/commitlint: π Lint commit messagesa
- [Wayback/Archive] Conventional Commits has more fields but also more structure, so it is very well suited for template use.
- [Wayback/Archive] pre-commit/pre-commit: A framework for managing and maintaining multi-language pre-commit hooks.
- It has quite a few [Wayback/Archive] Forks Β· git-commit-template.md, but at the time of writing none do add new commits except one which translated the markdown into Japanese and moved it into the
It also has some links to the documentation, but not deep links and misses a few, so I added those below myself.
- [Wayback/Archive] Git – Git Configuration:
commit.template - [Wayback/Archive] Git –
git-configDocumentation:commit.template - [Wayback/Archive] Git –
git-commitDocumentation:--template=<file>
–jeroen





