File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ Git commit conventions
2+ ======================
3+
4+ Each commit message should start with a directory or full file path
5+ prefix, so it was clear which part of codebase a commit affects. If
6+ a change affects one file, it's better to use path to a file. If it
7+ affects few files in a subdirectory, using subdirectory as a prefix
8+ is ok. For longish paths, it's acceptable to drop intermediate
9+ components, which still should provide good context of a change.
10+ It's also ok to drop file extensions.
11+
12+ Besides prefix, first line of a commit message should describe a
13+ change clearly and to the point, and be a grammatical sentence with
14+ final full stop. First line should fit within 78 characters. Examples
15+ of good first line of commit messages:
16+
17+ py/objstr: Add splitlines() method.
18+ py: Rename FOO to BAR.
19+ docs/machine: Fix typo in reset() description.
20+ ports: Switch to use lib/foo instead of duplicated code.
21+
22+ After the first line, add an empty line and in following lines describe
23+ a change in a detail, if needed. Any change beyond 5 lines would likely
24+ require such detailed description.
25+
26+ To get good practical examples of good commits and their messages, browse
27+ thry the ` git log ` of the project.
28+
129Python code conventions
230=======================
331
You can’t perform that action at this time.
0 commit comments