git checkout b # b is checked out (b could be master for exampel) git pull # update local b git merge a # merge branch a into b git push # b changes on remote with merged source.