I have a branch master
that I branched off of and I want to merge my changes into a release
branch. The thing is tho, since I branched off of master
I have commits in my branch that don't need to go into the release
branch. I tried rebasing like git rebase origin/release
but that doesn't seem to remove the unwanted commits. How can I remove the unwanted commits and have my work on top of the release work?
CodePudding user response:
The problem is you're giving the wrong rebase command. Say
git switch mybranch
git rebase --onto release master mybranch