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<
One more way assume branch1 - is branch with committed changes branch2 - is desirable branch
git fetch && git checkout branch1
git log
select commit ids that you need to move
git fetch && git checkout branch2
git cherry-pick commit_id_first..commit_id_last
git push
Now revert unpushed commits from initial branch
git fetch && git checkout branch1
git reset --soft HEAD~1