Git plays a very important role in software development. It allows for collaboration across the globe. In such an ecosystem, git commits must show what the other developer's thought process was while working. Maybe that other developer is your self from 3 months back.
- The
title
must start with a capital letter unless it is an identifier. - The
body
and thetitle
must be separated by 2 blank lines. - The
title
should not end with a period. - Each line in the body shouldn't exceed 75 characters.
- Use the imperative form of verbs (
Add
notAdded
,Remove
notRemoved
). - The
title
shouldn't exceed 72 characters. - The commit's
body
must explain the entire thought process behind the changes or further details. - Your git commit must have a
title
that briefly sums up the changes made to the codebase.
You could visit any successful open source project and view their git commits.
For example, this commit is a good example of a well-written commit.
I would like to quote what Atom says in their contributing guidelines.
These are mostly guidelines, not rules. Use your best judgment.
This is a summary of these resources:
Gnome guidelines
Atom guidelines
I highly encourage to read these. 😄
| Photo by Yancy Min on Unsplash
Top comments (0)