Update Git branches from master


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 master and... 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

Then merge:

git merge origin/master

Then push:

git push origin b1

Alternatively, you can do a rebase:

git fetch
git rebase origin/master

How can I stop .gitignore from appearing in the list of untracked files?

Push commits to another branch