3 ms·
Both are important, imo. Writing good commits is useful for “showing your work” and breaking things down into steps. For example if I need to refactor a compone
by programmarchy 4y ago
Both are important, imo. Writing good commits is useful for “showing your work” and breaking things down into steps. For example if I need to refactor a component when building a new feature, then I do it in a separate commit. Makes it easy to spin out a separate PR if necessary, and helps a reader understand why the refactor was necessary by looking at the next commit diff.
You can still write “fix” and “wip” commits locally, as long as you rebase them before you push your branch.
- avgcorrection 4y agoI also think that more commits when doing refactors help with history tracing once file renames get involved. It can be real head-scratcher to try to trace a function back through some commit that introduces a new feature + a whole module refactor. Even with “follow”.