3 ms·
Why bother keeping minor commits in feature branches? They just clutter the main branch without adding any useful information that a future maintainer could use
by weavejester 3y ago
Why bother keeping minor commits in feature branches? They just clutter the main branch without adding any useful information that a future maintainer could use.
- kvdveer 3y agoIf the minor commits are related to the feature branch, by all means squash it into the feature commits if you feel that makes your feature branch easier to review. However,should you, while developing your feature, find some minor thing that needs improving (e.g. adding comments, spelling fixes or tests to some existing API you encountered while developing your feature), it can be better to keep it separate, so there's fewer red herring in both the history and the review.
- cerved 3y agoBecause it's much easier to rebase ontop of and it declutters the important commits. Typically, you git log main --first-parent
- IshKebab 3y agoThe sensible alternative is squashing the commit, not doing a rebase merge.