The author clearly hasn't worked on a project where the maintainers care about the decomposition of the commits and the commit messages
Make small commits, each of them do their own thing, each of them build and test successfully on their own. Most critically the commit messages should contain the motivation for the change. I love to cite error logs here to indicate what symptom it fixes.
It's a higher discipline activity but it's really worth it.