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<
If you have a low # of commits and you don't care if these are combined into one mega-commit, this works well and isn't as scary as doing git rebase
:
unstage the files (replace 1 with # of commits)
git reset --soft HEAD~1
create a new branch
git checkout -b NewBranchName
add the changes
git add -A
make a commit
git commit -m "Whatever"