I use git every day, but don't do much with branches because I work alone. I'm curious about something related to the branches, when a new branch is on a remote, and then it needs to be fetched and merged separately from the master branch.
So pretend I'm on the master branch on my machine:
git checkout -b develop
# I make changes to files on develop
git add .
git commit -am "I have made changes to develop"
git push origin develop
Now there is a develop branch on the remote. Somebody else now fetches and merges (they are on master):
git fetch origin
# git shows that there is a new branch develop, and merge is also required for origin/master
Normally without the develop branch, I would run this command from master:
git merge origin/master
Do I also need to checkout develop and merge origin/develop?
# Do I need to do this too?
git checkout develop
git merge origin/develop
Is there a way to merge all branches with their remote counterparts, all in one command?