I think that the best way to do this is:
Stash your local changes:
git stash
Update the branch to the latest code
git pull
Merge your local changes into the latest code:
git stash apply
Add, commit and push your changes
git add
git commit
git push
In my experience this is the path to least resistance with Git (on the command line anyway).