How to Write a Git Commit Message (2014)
chris.beams.io
How to Write a Git Commit Message (2014)
1–10 of 121 posts
Re: How to Write a Git Commit Message (2014)
#2I'd also say: remove thw -m option from git and force people to open the editor. Do not accept messages shorter than 3 lines, start the editor with a template
Title
What changed and why it changed.Re: How to Write a Git Commit Message (2014)
#3The most important tip is "Use the body to explain what and why vs. how". I'd also say: remove thw -m option from git and force people to open the editor. Do not accept messages shorter than 3 lines, start the editor with a template Title What changed and why it changed.
Re: How to Write a Git Commit Message (2014)
#4The most important tip is "Use the body to explain what and why vs. how". I'd also say: remove thw -m option from git and force people to open the editor. Do not accept messages shorter than 3 lines, start the editor with a template Title What changed and why it changed.
Re: How to Write a Git Commit Message (2014)
#5The most important tip is "Use the body to explain what and why vs. how". I'd also say: remove thw -m option from git and force people to open the editor. Do not accept messages shorter than 3 lines, start the editor with a template Title What changed and why it changed.
I commit very often and usually small, "atomic" changes most of the time.
What I will do, is that I start the commit message with the most important sentence and add less important sentences after, so even if it exceeds 80 chars and you can't see the whole message you will still get the most relevant info without having to scroll sideways.
For reference, here are the commits to a project I am currently working on: https://github.com/eriknstr/jumper/commits/master
Re: How to Write a Git Commit Message (2014)
#6Re: How to Write a Git Commit Message (2014)
#7The most important tip is "Use the body to explain what and why vs. how". I'd also say: remove thw -m option from git and force people to open the editor. Do not accept messages shorter than 3 lines, start the editor with a template Title What changed and why it changed.
here's
some
code.
Concentrating on form over substance is myopic.Re: How to Write a Git Commit Message (2014)
#8We agree on a short list of leading active verbs:
Add = Create a capability e.g. feature, test, dependency.
Cut = Remove a capability e.g. feature, test, dependency.
Fix = Fix an issue e.g. bug, typo, accident, misstatement.
Bump = Increase the version of something e.g. dependency.
Make = Change the build process, or tooling, or infra.
Start = Begin doing something; e.g. create a feature flag.
Stop = End doing something; e.g. remove a feature flag.
Refactor = A code change that MUST be just a refactoring.
Reformat = Refactor of formatting, e.g. omit whitespace.
Optimize = Refactor of performance, e.g. speed up code.
Document = Refactor of documentation, e.g. help files.
Re: How to Write a Git Commit Message (2014)
#9https://github.com/torvalds/subsurface-for-dirk/blob/0f58510...
I always send this to people as I teach them git.