Posted By: Anonymous
I’m new to Git, and now I’m in this situation:
- I have four branches (master, b1, b2, and b3).
- After I worked on b1-b3, I realized I have something to change on branch master that should be in all other branches.
- I changed what I needed in
masterand… here is my problem:
How do I update all other branches with
master branch code?
You have two options:
The first is a merge, but this creates an extra commit for the merge.
Checkout each branch:
git checkout b1
git merge origin/master
git push origin b1
Alternatively, you can do a rebase:
git fetch git rebase origin/master