if a patch fixes a bug and optimizes the performance of a feature, split it into two separate commits. The implementation of a feature and the corresponding tests belong in the same commit, which should not be split. A small and cohesive commit is easier to review and grasp. Git’s annotateandblame commands will be more clear about the origin and reason behind each line of the entire source code. If you find the need to revert the changeset, it is possible to revertthat single commit in an instant, and the project will exist as if that change wouldn’t have existed in the first place. The same applies if you have to backport (in git terms,cherry-pick) a fix to previous releases. Always keep commits as small and cohesive as possible and ask your contributors to do the same, and the project will be easier to maintain.