Skip to content

Commit 5d7fa18

Browse files
committed
Update git commit guidelines
Taken from https://chris.beams.io/posts/git-commit/ Relates to DEVSIX-1337
1 parent 43466a6 commit 5d7fa18

File tree

1 file changed

+19
-8
lines changed

1 file changed

+19
-8
lines changed

CONTRIBUTING.md

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,8 @@ We have guidelines on how our git commit messages should be formatted. This lead
169169
readable messages** that are easy to follow when looking through the **project history**. But also,
170170
we use the git commit messages to **generate the iText 7 Community change log**.
171171
172+
These guidelines were taken from Chris Beams' blog post [How to Write a Git Commit Message][git-commit].
173+
172174
### Commit Message Format
173175
Each commit message consists of a **subject**, a **body** and a **footer**:
174176

@@ -180,23 +182,24 @@ Each commit message consists of a **subject**, a **body** and a **footer**:
180182
<footer>
181183
```
182184

183-
Any line of the commit message should not be longer 70 characters! This allows the message to be easier
185+
Any line of the commit message should not be longer 72 characters! This allows the message to be easier
184186
to read on GitHub as well as in various git tools.
185187

186188
### Subject
187189
The subject contains succinct description of the change:
188190

189-
* use the imperative, present tense: "change" not "changed" nor "changes"
190-
* don't capitalize first letter
191-
* no dot (.) at the end
192-
* describe what the **change** does, not the actions the developer has done
191+
* [Separate subject from body with a blank line][git-commit-separate]
192+
* [Limit the subject line to 50 characters][git-commit-limit-50]
193+
* [Capitalize the subject line][git-commit-capitalize]
194+
* [Do not end the subject line with a period][git-commit-end]
195+
* [Use the imperative mood in the subject line][git-commit-imperative]
193196

194197
### Body
195-
Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes".
196-
The body should include the motivation for the change and contrast this with previous behavior.
198+
* [Wrap the body at 72 characters][git-commit-wrap-72]
199+
* [Use the body to explain _what_ and _why_ vs. _how_][git-commit-why-not-how]
197200

198201
### Footer
199-
The footer should contain any information about **Breaking Changes** and is also the place to
202+
The footer contains any information about **Breaking Changes** and is also the place to
200203
reference JIRA or GitHub issues that this commit **Closes**.
201204

202205

@@ -228,3 +231,11 @@ We use the [Stack Exchange][stackoverflow] network for free support and [GitHub]
228231
[mcve]: http://stackoverflow.com/help/mcve
229232
[support]: http://itextpdf.com/support
230233
[unit-testing]: http://junit.org/
234+
[git-commit]: https://chris.beams.io/posts/git-commit/
235+
[git-commit-separate]: https://chris.beams.io/posts/git-commit/#separate
236+
[git-commit-limit-50]: https://chris.beams.io/posts/git-commit/#limit-50
237+
[git-commit-capitalize]: https://chris.beams.io/posts/git-commit/#capitalize
238+
[git-commit-end]: https://chris.beams.io/posts/git-commit/#end
239+
[git-commit-imperative]: https://chris.beams.io/posts/git-commit/#imperative
240+
[git-commit-wrap-72]: https://chris.beams.io/posts/git-commit/#wrap-72
241+
[git-commit-why-not-how]: https://chris.beams.io/posts/git-commit/#why-not-how

0 commit comments

Comments
 (0)