Permalink
Browse files

CODECONVENTIONS.md: Describe git commit messages conventions.

  • Loading branch information...
1 parent bc7ca7c commit cea1c621e0c05c9a90a693167fba9a4e8f42533a @pfalcon pfalcon committed May 7, 2016
Showing with 28 additions and 0 deletions.
  1. +28 −0 CODECONVENTIONS.md
View
@@ -1,3 +1,31 @@
+Git commit conventions
+======================
+
+Each commit message should start with a directory or full file path
+prefix, so it was clear which part of codebase a commit affects. If
+a change affects one file, it's better to use path to a file. If it
+affects few files in a subdirectory, using subdirectory as a prefix
+is ok. For longish paths, it's acceptable to drop intermediate
+components, which still should provide good context of a change.
+It's also ok to drop file extensions.
+
+Besides prefix, first line of a commit message should describe a
+change clearly and to the point, and be a grammatical sentence with
+final full stop. First line should fit within 78 characters. Examples
+of good first line of commit messages:
+
+ py/objstr: Add splitlines() method.
+ py: Rename FOO to BAR.
+ docs/machine: Fix typo in reset() description.
+ ports: Switch to use lib/foo instead of duplicated code.
+
+After the first line, add an empty line and in following lines describe
+a change in a detail, if needed. Any change beyond 5 lines would likely
+require such detailed description.
+
+To get good practical examples of good commits and their messages, browse
+thry the `git log` of the project.
+
Python code conventions
=======================

0 comments on commit cea1c62

Please sign in to comment.