Skip to content

Commit 6c8294b

Browse files
JukkaLgvanrossum
authored andcommitted
Add style guidelines for commit messages (#3752)
1 parent 2d67784 commit 6c8294b

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

CONTRIBUTING.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,22 @@ Core developers should follow these rules when processing pull requests:
112112
* Use "[Squash and merge](https://github.com/blog/2141-squash-your-commits)"
113113
to merge PRs.
114114
* Delete branches for merged PRs (by core devs pushing to the main repo).
115+
* Edit the final commit message before merging to conform to the following
116+
style (we wish to have a clean `git log` output):
117+
* When merging a multi-commit PR make sure that the commit message doesn't
118+
contain the local history from the committer and the review history from
119+
the PR. Edit the message to only describe the end state of the PR.
120+
* Make sure there is a *single* newline at the end of the commit message.
121+
This way there is a single empty line between commits in `git log`
122+
output.
123+
* Split lines as needed so that the maximum line length of the commit
124+
message is under 80 characters, including the subject line.
125+
* Capitalize the subject and each paragraph.
126+
* Make sure that the subject of the commit message has no trailing dot.
127+
* Use the imperative mood in the subject line (e.g. "Fix typo in README").
128+
* If the PR fixes an issue, make sure something like "Fixes #xxx." occurs
129+
in the body of the message (not in the subject).
130+
* Use Markdown for formatting.
115131

116132

117133
Issue-tracker conventions

0 commit comments

Comments
 (0)