| 12 | |
| 13 | == Writing Commit Messages |
| 14 | |
| 15 | What follows is a brief outline of what constitutes a good commit message. More extensive guidelines can be found [https://chris.beams.io/posts/git-commit/ here] and [https://git-scm.com/book/en/v2/Distributed-Git-Contributing-to-a-Project here]. |
| 16 | |
| 17 | Commits should be atomic. If three separate issues are being fixed (unless they are all fixed by one change), they need to be done as three separate commits. This also applies to whitespace and style changes, which should be done in their own commit. Whitespace commits should not include code or content changes. Accordingly, code change commits should not include whitespace changes (unless the whitespace changes are on the same lines as the code being changed). |
| 18 | |
| 19 | Commit messages should describe what changed, and reference the issue number if the commit closes or is associated with a particular issue. Example: |
| 20 | |
| 21 | {{{ |
| 22 | Version: Short Description |
| 23 | |
| 24 | Optional Long Description |
| 25 | |
| 26 | Refs #zzz |
| 27 | }}} |
| 28 | |
| 29 | === Subject |
| 30 | |
| 31 | This is the first line. It consists of the development version, like `1.2.2dev`. This line must be 72 characters or less. There should be no full stop (period) at the end and the imperative form should be used (example: //Add a command for setting wiki attributes//). |
| 32 | |
| 33 | === Long description |
| 34 | |
| 35 | There are two line breaks between the subject and the long description. The description can have any length and formatting, like lists, but it must be hard-wrapped at 80 characters. |
| 36 | |
| 37 | === References |
| 38 | |
| 39 | List the issues being addressed, using either `Refs` or `Fixes`. A comma-separated list of issues can be used: `Refs #12, #34`. |