Closed kevinwhoffman closed 6 years ago
@DevinWalker We can use default git message template to improve commit message. For Ref: https://robots.thoughtbot.com/better-commit-messages-with-a-gitmessage-template
Most of editor use git message template.
Source Tree
Atom
I agree with @kevinwhoffman on emphasize Why instead of How.
People can easily see How it's done but it's hard to understand Why it's done.
@ravinderk suggested a good point too. Using commit message template to describe Why & How would be a great deal like we follow issue template while creating a new issue on repository.
Edit: This content has been moved to the Git Communication Standards section of the Wiki.
Per discussion with @DevinWalker and @ravinderk, I'll be moving these guidelines into the Give Wiki. Once the Wiki is built out, it can be linked to from the README.md
and/or CONTRIBUTING.md
.
Closing as the Development Handbook in the Wiki covers all of the above topics.
Issue Overview
As we look to modernize the Give pipeline, I’d also like to propose some guidelines for Git commit messages that will help create more consistent and informative Git logs. If the team agrees, we could move these guidelines to
CONTRIBUTING.md
.The seven rules of a great Git commit message
The inspiration for these guidelines can be summarized in the following 7 points:
Emphasize Why instead of How
Example
You can see an example of consistent formatting in the WPBR commit history.
I've been following these guidelines for a few years. While I need to do a much better job of explaining the why, I find the formatting alone makes for better Git logs that are easier to scan over time.
Considerations
Consistently formatting commit messages is an easy win. The more challenging task with these type of guidelines is balancing clarity with efficiency. After a few weeks I think it will become second nature as it did for me. Interested to hear your thoughts.