Writing commit messages
Of course, there are lots of guides to commit messages already. Why am I bothering to write another one? Mostly because, when I’ve looked at other guides, they don’t seem to be focusing on the most important things. The one that first started me making notes towards this article consisted of a 7-point list of guidelines, most of which were tiny details of the initial ‘subject line’ part of the commit – what tense to use, whether to end it with a full stop, capitalisation – and the final rule just said ‘Use the body to explain what and why vs. how’. To my way of thinking, that’s focusing on the trivial and neglecting the important. Yes, it’s nice to have a consistent grammatical style in your subject lines – but it’s not vital. Not the same way that ‘include all the important facts and reasoning’ is vital. A commit-message guide ought to focus on information, not typography. What do you put in, and what do you leave out? The rule that said ‘explain why and what’ should have been most of
Writing commit messages Writing commit messages [Simon Tatham, 2024-05-19] Introduction Why write yet another of these guides? What’s your authority to pontificate on this subject? What information should I include? Who will read my commit message, and why? What will someone get out of reading the commit message? OK, so what information should I include? In the commit message, or somewhere else? Use commit messages in preference to cover letters Commit message describes changes; code comment describes how things are Consider adjusting the patch to make the commit message simpler Writing style
Explore this link on the map →saved by
related reading
- How to Write a Git Commit Messagecbea.ms
- How to Write Better Git Commit Messages – A Step-By-Step Guidefreecodecamp.org
- Conventional Commitsconventionalcommits.org
- Short: WiP · Rafał Pastuszaksonnet.io
- meks.questmeks.quest
- Command Line Interface Guidelinesclig.dev
- A Bunch of Programming Advice I'd Give To Myself 15 Years Ago | Marcus' Blogmbuffett.com
- The Git Commands I Run Before Reading Any Codepiechowski.io
- Keep a Changelogkeepachangelog.com
- OMBD#21: Master Git Diff With These Not-So-Known Commands | by Jon Portella | ITNEXTjportella93.medium.com
- Git - user-manual Documentationgit-scm.com
- Git Notes: git's coolest, most unloved­ feature - Tyler Ciprianitylercipriani.com