3 ms·
Don't you always have commits chains like "add debug printfs" "fix bug" "remove debug printfs"?
by qznc 10y ago
Don't you always have commits chains like "add debug printfs" "fix bug" "remove debug printfs"?
- manicdee 10y agoThat's a scenario for branch-then-cherrypick :) Branch, write test to expose bug, add debug aids, fix bug, switch branch, cherry pick the test & fix, delete debug branch.
- majewsky 10y agoOr just `git rebase -i origin/master` and delete the unnecessary commits without additional branching.
- pYQAJ6Zm 10y agoI have these in my WIP branches. When I’m ready to merge, I squash out some of the smaller commits, and then merge without fast-forward. Reduces noise and keeps a clear history of groups of work, at the expense of very cheap branching and local rebasing operations.