Current branch will be updated to master, and then all new commits in it will be moved to head.
Not pushed
git fetch
git rebase origin/master
Pushed
git checkout master
git pull
git checkout branchname
git rebase master
git status
git add
git rebase --continue
git push origin branchname --force-with-lease