@@ -169,6 +169,8 @@ We have guidelines on how our git commit messages should be formatted. This lead
169
169
readable messages** that are easy to follow when looking through the **project history**. But also,
170
170
we use the git commit messages to **generate the iText 7 Community change log**.
171
171
172
+ These guidelines were taken from Chris Beams' blog post [How to Write a Git Commit Message][git-commit].
173
+
172
174
# ## Commit Message Format
173
175
Each commit message consists of a ** subject** , a ** body** and a ** footer** :
174
176
@@ -180,23 +182,24 @@ Each commit message consists of a **subject**, a **body** and a **footer**:
180
182
< footer>
181
183
` ` `
182
184
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
184
186
to read on GitHub as well as in various git tools.
185
187
186
188
# ## Subject
187
189
The subject contains succinct description of the change:
188
190
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]
193
196
194
197
# ## 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]
197
200
198
201
# ## 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
200
203
reference JIRA or GitHub issues that this commit ** Closes** .
201
204
202
205
@@ -228,3 +231,11 @@ We use the [Stack Exchange][stackoverflow] network for free support and [GitHub]
228
231
[mcve]: http://stackoverflow.com/help/mcve
229
232
[support]: http://itextpdf.com/support
230
233
[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