Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix good commit example to use imperative title #587

Merged
merged 5 commits into from
May 25, 2020
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions pullrequest.rst
Original file line number Diff line number Diff line change
Expand Up @@ -258,21 +258,30 @@ and for each pull request there may be several commits. In particular:

Commit messages should follow the following structure::

bpo-42: the spam module is now more spammy (GH-NNNN)
bpo-42: make the spam module more spammy (GH-NNNN)
DahlitzFlorian marked this conversation as resolved.
Show resolved Hide resolved

The spam module sporadically came up short on spam. This change
raises the amount of spam in the module by making it more spammy.

The first line or sentence is meant to be a dense, to-the-point explanation
of what the purpose of the commit is. If this is not enough detail for a
commit, a new paragraph(s) can be added to explain in proper depth what has
happened (detail should be good enough that a core developer reading the
commit message understands the justification for the change).
of what the purpose of the commit is. The imperative form is strongly
DahlitzFlorian marked this conversation as resolved.
Show resolved Hide resolved
preferred to a descriptive form such as 'the spam module is now more spammy'.
Use ``git log --oneline`` to see existing title lines. Furthermore, the first
line should not end in a period.

If this is not enough detail for a commit, a new paragraph(s) can be added
to explain in proper depth what has happened (detail should be good enough
that a core developer reading the commit message understands the
justification for the change).

Check :ref:`the git bootcamp <accepting-and-merging-a-pr>` for further
instructions on how the commit message should look like when merging a pull
request.

.. note::
`How to Write a Git Commit Message <https://chris.beams.io/posts/git-commit/>`_
is a nice article describing how to write a good commit message.
DahlitzFlorian marked this conversation as resolved.
Show resolved Hide resolved


.. _cla:

Expand Down