@@ -232,7 +232,7 @@ Here are the steps for submitting a change in the code base:
232
232
233
233
#. Create a new branch named after what your are working on::
234
234
235
- git checkout -b my-topic
235
+ git checkout -b my-topic -t origin/master
236
236
237
237
#. Edit the code and call ``make format `` to ensure your modifications comply
238
238
with the `coding style `__.
@@ -251,21 +251,60 @@ Here are the steps for submitting a change in the code base:
251
251
your changes do not break anything. You can also run ``make `` which will run
252
252
both.
253
253
254
- #. Create commits by following these simple guidelines:
255
-
256
- - Solve only one problem per commit.
257
- - Use a short (less than 72 characters) title on the first line followed by
258
- an blank line and a more thorough description body.
259
- - Wrap the body of the commit message should be wrapped at 72 characters too
260
- unless it breaks long URLs or code examples.
261
- - If the commit fixes a Github issue, include the following line::
262
-
263
- Fixes: #NNNN
264
-
265
- Inspirations:
266
-
267
- https://chris.beams.io/posts/git-commit/
268
- https://wiki.openstack.org/wiki/GitCommitMessages
254
+ #. Once you are happy with your work, you can create a commit (or several
255
+ commits). Follow these general rules:
256
+
257
+ - Address only one issue/topic per commit.
258
+ - Describe your changes in imperative mood, e.g. *"make xyzzy do frotz" *
259
+ instead of *"[This patch] makes xyzzy do frotz" * or *"[I] changed xyzzy to
260
+ do frotz" *, as if you are giving orders to the codebase to change its
261
+ behaviour.
262
+ - Limit the first line (title) of the commit message to 60 characters.
263
+ - Use a short prefix for the commit title for readability with ``git log
264
+ --oneline ``. Do not use the `fix: ` nor `feature: ` prefixes. See recent
265
+ commits for inspiration.
266
+ - Only use lower case letters for the commit title except when quoting
267
+ symbols or known acronyms.
268
+ - Use the body of the commit message to actually explain what your patch
269
+ does and why it is useful. Even if your patch is a one line fix, the
270
+ description is not limited in length and may span over multiple
271
+ paragraphs. Use proper English syntax, grammar and punctuation.
272
+ - If you are fixing an issue, use appropriate ``Closes: <URL> `` or
273
+ ``Fixes: <URL> `` trailers.
274
+ - If you are fixing a regression introduced by another commit, add a
275
+ ``Fixes: <COMMIT_ID> ("<TITLE>") `` trailer.
276
+ - When in doubt, follow the format and layout of the recent existing
277
+ commits.
278
+ - The following trailers are accepted in commits. If you are using multiple
279
+ trailers in a commit, it's preferred to also order them according to this
280
+ list.
281
+
282
+ * ``Closes: <URL> ``: close the referenced issue or pull request.
283
+ * ``Fixes: <SHA> ("<TITLE>") ``: reference the commit that introduced
284
+ a regression.
285
+ * ``Link: <URL> ``: any useful link to provide context for your commit.
286
+ * ``Suggested-by ``
287
+ * ``Requested-by ``
288
+ * ``Reported-by ``
289
+ * ``Co-authored-by ``
290
+ * ``Tested-by ``
291
+ * ``Reviewed-by ``
292
+ * ``Acked-by ``
293
+ * ``Signed-off-by ``: Compulsory!
294
+
295
+ There is a great reference for commit messages in the `Linux kernel
296
+ documentation `__.
297
+
298
+ __ https://www.kernel.org/doc/html/latest/process/submitting-patches.html#describe-your-changes
299
+
300
+ IMPORTANT: you must sign-off your work using ``git commit --signoff ``. Follow
301
+ the `Linux kernel developer's certificate of origin `__ for more details. All
302
+ contributions are made under the MIT license. If you do not want to disclose
303
+ your real name, you may sign-off using a pseudonym. Here is an example::
304
+
305
+ Signed-off-by: Robin Jarry <[email protected] >
306
+
307
+ __ https://www.kernel.org/doc/html/latest/process/submitting-patches.html#sign-your-work-the-developer-s-certificate-of-origin
269
308
270
309
#. Push your topic branch in your forked repository::
271
310
0 commit comments