

Keep commits focused – You’ll find different levels of zealotry around this, just as you will with the Single Responsibility Principle, and it’s similar in its vague helpfulness. While there are many areas of contention, there are also many general best practices, and the items in this list should serve you well on most teams. Most of this post is applicable to subversion or TFS or any modern source control system, but I do assume branching is easy. My hope with this post is to provide a primer for those developers who’ve never received any mentoring or feedback on their source control habits. These are often folks who either worked on mostly solo projects, where no one else is reviewing commits, or worked on enormous projects with huge teams, where there’s so much noise that commit patterns get lost. But every so often, I’ll run into a great engineer with years of experience who has just never learned good habits around source control.

I have expectations about how senior devs will commit code, and for the most part, they seem to align with others. Git commit hygiene is one of those things where you don’t realize you have such strong opinions – until you work with someone who has different practices.
