Say, you have a long history of commits with multiple cross-merges, and now you've finally ready with the "other" branch.
Now, before the final integration, you want to have all those changes provided as single clean commit, no merges, no "forgot to add tests", no "typo fixed", etc.
The most "obvious" solution seems to be "interactive rebase". But.. this is unfortunately VERY cumbersome and sometimes even virtually impossible,
especially when the branch history was riddled with conflicts and intermediate merges.
So, I eventually figured out another way of doing it:
- say, you have a
target branch (which is a trunk) and a
feature branch, which has history you want to squash.
NOTE: (important): latest
target is already merged into