2

Working on a feature branch that was created from a previous release branch. The feature could not be merged into that release. Now I want to merge this feature branch into the current release branch. How do I copy all my changes (100 of files) from feature branch to current release branch.

user3755282
  • 813
  • 2
  • 9
  • 15

1 Answers1

0

You can use a git rebase --onto:

git rebase --onto newReleaseBranch $(git merge-base oldReleaseBranch featureBranch) featureBranch

It uses git merge-base to compute the base commit between the oldReleaseBranch and your feature branch.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250