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
More on Commits, branches and tags
What is the difference between `git add .`, `git add -A` and `git add -u`?BeginnerHow do you commit only part of the changes in a file?BeginnerHow do you change the last commit message or add a forgotten file?BeginnerWhat is the difference between `git switch`, `git restore` and `git checkout`?BeginnerWhat is the difference between lightweight and annotated tags?BeginnerHow does `git describe` work and where is it useful?Intermediate