We have a workflow where each feature branch must have only one commit.
Then we have a develop branch, where we merge all feature branches, and once those changes are approved, we create PR to a release branch, and merge the same feature branch to the release branch.
But there are times when there are conflicts and resolving conflicts need merging develop branch into the feature branch.
This brings a lot of unwanted commits into the feature branch, which we don't want as the rule for feature branch is that there should be only one commit pertaining to the feature only.
Also merging this into release branch brings a lot of unwanted commits which is not accepted by the PR incharge.
So my question is, that is there a way to undo all base branch commits from feature branch after conflict is resolved?
Or is there a way to resolve merge conflits without merging base branch into feature branch?