Skip to content

Commit a9b6667

Browse files
authored
Merge pull request libgit2#4422 from pks-t/pks/commit-msg-style
CONTRIBUTING: add documentation of our commit message style
2 parents 364184a + d790545 commit a9b6667

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
@@ -71,6 +71,22 @@ if we have to read the whole diff to figure out why you're contributing
7171
in the first place, you're less likely to get feedback and have your change
7272
merged in.
7373

74+
In addition to outlining your thought process in the PR's description, please
75+
also try to document it in your commits. We welcome it if every commit has a
76+
description of why you have been doing your changes alongside with your
77+
reasoning why this is a good idea. The messages shall be written in
78+
present-tense and in an imperative style (e.g. "Add feature foobar", not "Added
79+
feature foobar" or "Adding feature foobar"). Lines should be wrapped at 80
80+
characters so people with small screens are able to read the commit messages in
81+
their terminal without any problem.
82+
83+
To make it easier to attribute commits to certain parts of our code base, we
84+
also prefer to have the commit subject be prefixed with a "scope". E.g. if you
85+
are changing code in our merging subsystem, make sure to prefix the subject with
86+
"merge:". The first word following the colon shall start with an lowercase
87+
letter. The maximum line length for the subject is 70 characters, preferably
88+
shorter.
89+
7490
If you are starting to work on a particular area, feel free to submit a PR
7591
that highlights your work in progress (and note in the PR title that it's
7692
not ready to merge). These early PRs are welcome and will help in getting

0 commit comments

Comments
 (0)