I have a few feature/topic branches A
, B
, C
. And I have a devel
branch.
I have just finished a patch/hotfix and committed it to devel
. A
, B
, C
were all child-branches of devel
until a while ago , but now they lack the patch/hotfix that I just committed to devel
.
How do I make all the branches A
, B
, C
to merge the new changes (patch/hotfix) from the ( new -) devel
?
I could go to each branch and then merge devel
into each branch one by one, but I guess there would be a better way?
edit: devel
, not
master
You'll need to update each branch one at a time. You could write a script to do this if you really wanted to, but that doesn't change the fact that they all need to be updated.
Either
git checkout A
git merge devel
or
git checkout A
git rebase devel
for each of your branches. Some discussion on merge vs rebase .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.