Code review



Summary:

When making commits, it is important to remember that they serve to explain to other coders why a change was made. There is no hard and fast rule for how many commits to make, but it is best to put oneself in the shoes of fellow coders and consider what the best way to explain the changes is. It is also important to make sure that every commit works and doesn't break the build, as git-bisect works best if every commit in the tree being debugged works without errors. Squashing all changes into one big commit can lead to a lack of explanation for why changes were made. Code review is a complex process and while individual commits can be useful for understanding why someone made a change, it may be better to encourage better commit behavior rather than squashing chains of commits.


Updated on: 2023-06-07T17:26:53.641432+00:00