The remote master is whatever the remote repo identifies as master
. Whenever you fetch from the origin
remote, git tags that remote's master
commit as your origin/master
(in your remotes
refs).
The way to update a remote repo's refs is to push to it (which also sends any commits or whatever else is needed). So:
git checkout master # or however you want to get `master` current with origin
git pull # ...
git checkout mybranch
git rebase master
git checkout -B master # you know it's going to --ff, so just move the ref
# or, you could `git checkout master; git merge mybranch`
git push origin master # push the new commits to the remote's `master`