How to write a Git Commit Message?
I recently realised about the importance of git commit messages when one of my co-workers who was looking at my Lisp Interpreter told me that my commit messages were not in a format. Until then I had never bothered to look into what makes a great commit message.
So what are the ingredients of a great commit message?
A common standard format to save soul searching.
1. Style
2. Content
3. Metadata
There are seven rules of a great Git commit message.
1. Separate the subject line from the body.
2. Limit the subject line to 50 characters.
3. Capitalize the subject line.
4. Do not end the subject line with a period.
5. Use imperative mood in the subject line.
6. Wrap the body in 72 characters.
7. Use the body to explain what , why and how [1].
I use a trello to remind me the same.
https://trello.com/b/mJA6Ceyi/how-to-write-a-git-commit
Links:
https://git-scm.com/book/en/v2
https://chris.beams.io/posts/git-commit/
[1] Chris Beams. "How to Write a Git Commit Message" . https://chris.beams.io/posts/git-commit/ . Last Accessed On: July 29, 2017
Comments
Post a Comment