Interview Prep/Git & GitHub/Commits, branches and tags

How do you write a good commit message?

BeginnerConceptCommits, branches and tags
Answer

A short imperative subject of about 50 characters, a blank line, then a body explaining why the change was needed rather than restating the diff. Reference the ticket at the end. Many teams use Conventional Commits (feat:, fix:, chore:) so changelogs and semantic versions can be generated.

fix(auth): reject expired refresh tokens

Tokens past exp were accepted when clock skew exceeded 5 min.
Closes #482
All Git & GitHub questions Roadmap: Git & GitHub

More on Commits, branches and tags