Whenever I have a complicated rebase because there are a lot of conclicts with my current feature branch and because my feature branch has lots of small commits, the resolution process seems troublesome and inefficient.
I've been looking for ways to essentialy squash before
the rebase happens. One solution seems to be to do a sofr reset to the last merge and then create one single commit out of the many commits, and only then do the rebase.
But this solution seems a bit hacky. Is there a better way to handle this.
EDIT: I'm referring to cases where a merge has to be done via pull request and I have no control over the merge process itself.
A soft reset to the last merge and then create a single new commit is the best solution. This has been heavily downvoted but I don't think this is justified, especially in cases where it's not possible to do a merge to master directly, as it has to be done via pull request.