I\'d like to move the last several commits I\'ve committed to master to a new branch and take master back to before those commits were made. Unfortunately, my Git-fu is not
If you just need to move all your unpushed commits to a new branch, then you just need to,
create a new branch from the current one :git branch new-branch-name
push your new branch: git push origin new-branch-name
revert your old(current) branch to the last pushed/stable state: git reset --hard origin/old-branch-name
Some people also have other upstreams
rather than origin
,
they should use appropriate upstream