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<
Alternatively, right after you commit to the wrong branch, perform these steps:
git loggit diff {previous to last commit} {latest commit} > your_changes.patchgit reset --hard origin/{your current branch}git checkout -b {new branch}git apply your_changes.patchI can imagine that there is a simpler approach for steps one and two.