Small Commits

Large commits are great when you don’t want people to really review your code. As commits get larger, they start to become difficult for a reviewer to load into their brain. To review a large commit, you have to do a full, deep context switch. You have to set aside time. If you get interrupted, you lose some context and have to get it back. It’s hard work.

When you make a small commit, on the other hand, the change you’re making to the code is small, by definition. And because the change is small, it’s easy for someone else to look at it and evaluate it. You get a good review, an actual review.

Small commits make life a little saner when merge conflicts come up, too.