-
-
Notifications
You must be signed in to change notification settings - Fork 2
Coding Standard
The commit message should start with a single line that is no more than 62 characters long and that describes the changeset concisely (similar to the subject in an email), followed by a blank line, followed by a more detailed explanation with lines less than 75 characters long.
The first line should not end with a period ("."). If there is only one line in the commit message it can be up to 75 characters long.
The more detailed explanation should include your motivation for the change and contrast its implementation with previous behavior. You should also use the imperative present tense in these messages. In other words, use commands. Instead of ‘I added tests for’ or ‘Adding tests for,’ use ‘Add tests for’.
Any change-id line should go at the end, separated from the other text by a blank line. Normally, this will be added for you by the commit hook script, but if you’re amending an existing commit message (eg during an interactive rebase) you’ll see one or more of these change-id lines and the amended message should follow the conventions. There should be only one change-id line in the result, of course.
See chapter 5 in the ProGit book (Commit Guidelines) and Documentation/SubmittingPatches in the git source code repository.
The format of the commit message will be checked when committing a change to git.
- Indent with tabs, not spaces
- no trailing whitespace
- tab size is 4 characters
Again, whitespace rules will be checked when committing a change to git.