I am working on a feature in a repo. I have created a feature branch (say branch_1
) and another branch (say branch_2
) on top of branch_1
. I used to rebase branch_2
every time branch_1
was updated, but now the branch_1
is being merged into master
so I want to rebase branch_2
into master
, so that branch_2
have only its own changes. How do I do this? Also is the right way or is there any other method?
You can just rebase this branch on master:
src/myproject (branch2)$ git rebase master
Any changes in contains that are already in master will be "swallowed" into those master changes, and you'll remain with just the distinct changes this branch contains.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With