Skip to content

Latest commit

 

History

History
26 lines (17 loc) · 844 Bytes

17-good-commit-messages.md

File metadata and controls

26 lines (17 loc) · 844 Bytes

How to write good commit messages?

For choosing a good commit message, you try to answer the following w questions:

  • what: fix, feature, delete, add
  • where: the file or element you changed (e.g. Button)
  • who: included already (git author)
  • how: what exactly did you change?
  • when: included already (commit timestamp)
  • why: "in order to"
  • (optional): reference to GitHub issue

Example:

fix(Button): change spacing in order to improve usability #25

You usually use present tense in commit messages.

Popular standard: Angular commit message guidelines
https://github.com/angular/angular/blob/master/CONTRIBUTING.md#commit

If you use fix or closes in your commit message and reference a GitHub issue, it automatically creates a reference and closes the issue.


Next