Reputation: 12906
I have the following case:
mainline ---x----NNN-----x---------
| |
| feature yyyyyyyy
release x ----------------------x
I like to have the feature branch in the release branch. But I like to have it "pure", meaning I do not like to have the commits NNN in the release yet.
One option would be to create a new branch and do a rebase --onto
git branch feature_for_release feature
git rebase --onto release mainline feature_for_release
git checkout release
git merge feature_for_release
git branch -d feature_for_release
But I do not like to create new branches just for a merge and the method is pretty lengthy.
Is there a solution like this?
git checkout release
git merge feature --without mainline
Upvotes: 0
Views: 167
Reputation: 239551
You can cherry-pick a series of commits from your feature branch onto your release branch.
Upvotes: 1