I\'ve done a fair bit of work (\"Your branch is ahead of \'origin/master\' by 37 commits.\") which really should have gone into its own branch rather than into master<
For me this was the best way:
git fetchgit branch my-changes and push to remotegit master -u upstream-branch remotes/origin/my-changesgit branch master --set-upstream-to remotes/origin/master