commit message
The text a person writes into a commit to say what it does and why: a one-line subject, a blank line, then an optional body.
In more detail
The message is the only part of a commit a person writes; everything else Git fills in. The subject is shown in one-line views, so keep it short, imperative and capitalised with no full stop. The body, wrapped near seventy-two columns, explains why the change was made and what alternatives were rejected, which the diff cannot show.
Example
git -C fixture log --grep=Remediates --format='%s'Related terms
- commit — A saved snapshot of the whole project in Git, together with its author, committer, time, message and a pointer to the commit before it.
- commit trailer — A structured "Key: value" line at the end of a commit message that tools can read.
- subject line — The first line of a commit message, a short summary that Git shows in one-line views such as git log --oneline.
- imperative mood — The grammatical form of a command, such as "Add the request timeout" rather than "Added" or "Adds".
- trailer — A "Key: value" line at the very end of a commit message that tools can read, such as Co-authored-by or Reviewed-by.
- commit template — A text file Git pre-fills into the editor when you commit, set with the commit.template setting.
- Conventional Commits — A specification for commit subject lines of the form type(optional scope): description, so tools can read what kind of change each commit is.
Taught in
- Instability: Change Fail Rate And Deployment Rework Rate — DevOps & Site Reliability Engineering
- The Four Keys History And Retiring MTTR — DevOps & Site Reliability Engineering
- Installing Git, And Telling It Who You Are — Advanced Git Internals & Distributed Workflows
- Committing, And What A Good Message Says — Advanced Git Internals & Distributed Workflows
- Conventional Commits — Advanced Git Internals & Distributed Workflows
- Resolving A Conflict, Line By Line — Advanced Git Internals & Distributed Workflows
- Interactive Rebase: Squash, Reorder, Reword — Advanced Git Internals & Distributed Workflows