Git Academy

Beginner · 4 min read

Write commits your team will thank you for

“fix”, “wip”, “final final v2”… Let's do better, in five minutes.

One commit, one idea

A commit should be revertable on its own. Mixing a bug fix, a rename and a formatting change makes reviewing and reverting painful. Stage only what belongs together.

Safe
$ git add -p

A message that explains why

The diff already says what changed. The message should say why. Short first line (under 72 characters), imperative mood, details in the body if needed.

Safe
$ git commit -m "fix(auth): refresh the session before it expires"

Conventional Commits

Prefixes like feat:, fix:, docs: make the history scannable and allow automatic changelogs. Our commit message helper in the Toolbox builds them for you.