-
Notifications
You must be signed in to change notification settings - Fork 11.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[all] Git Commit Message Style Guide #300
Comments
👍 |
Many thanks! However, I don't think we need this. I prefer to deal with and teach newbies rather than to make everyone read and comply with a long list of rules. |
@JoseAlcerreca, this and the Fernando Cejas project became the main references in community about Android architecture. Several developers will start their own projects getting inspired by this one. Thus I believe that adopting some style will drive people how to organize their code history as well ;-) |
We prefer small and frequent commits. If you enforce that style people will simply commit less often. |
Hi, Any specific commit format to follow for addressing pull request review comments? |
Git Commit Message Style Guide
This is only a suggestion/discussion about adopting a commit message style guide
The following text was transcripted from Udacity Git Commit Message Style Guide. It also can be combined with other ideas, such as commit message emojis.
Introduction
There are many opinions on the ideal style in the world of development. Therefore, in order to reduce the confusion on what style students should follow during the course of their projects, we urge all contributors to refer to this style guide for this project.
Commit Messages
Message Structure
A commit messages consists of three distinct parts separated by a blank line: the title, an optional body and an optional footer. The layout looks like this:
The title consists of the type of the message and subject.
The Type
The type is contained within the title and can be one of these types:
The Subject
Subjects should be no greater than 50 characters, should begin with a capital letter and do not end with a period.
Use an imperative tone to describe what a commit does, rather than what it did. For example, use change; not changed or changes.
The Body
Not all commits are complex enough to warrant a body, therefore it is optional and only used when a commit requires a bit of explanation and context. Use the body to explain the what and why of a commit, not the how.
When writing a body, the blank line between the title and the body is required and you should limit the length of each line to no more than 72 characters.
The Footer
The footer is optional and is used to reference issue tracker IDs.
Example Commit Message
The text was updated successfully, but these errors were encountered: