git merge master into branch

C++
git checkout dmgr2      # gets you "on branch dmgr2"
git fetch origin        # gets you up to date with origin
git merge origin/master
git checkout master
git pull origin master
git merge test
git push origin master
$ git checkout master
$ git branch new-branch
$ git checkout new-branch

# ...develop some code...

$ git add –A
$ git commit –m "Some commit message"
$ git checkout master
$ git merge new-branch
git checkout feature1
git merge master# 2. merge feature branch to origin/master branch
$ git checkout master
$ git pull origin/master

$ git merge feature
$ git push origin/master
git checkout feature1
git merge master

Source

Also in C++: