First of all, make sure that you are in the current stage of the master by pulling it to local:
git pull origin master
Then, in local its enough to checkout without mention the origin:
git checkout some-branch
// now do your coding changes in this branch, save, commit and push
Later, you should push the merged content to master as well, so:
git checkout master
git merge some-branch // now its locally merged to master
git push origin master // now its in the remote repo
To make sure and keep track of your local git repo and the remote git repo stages, use:
git log --oneline // oneline flag makes it easier to read
If you see that your working directory is BEHIND the branch you are about to work on, remember the first command of pull to make them even.