I'd like to move the last several commits I've made to master to a new branch and take master back to before those commits were made. Unfortunately, my Git-fu isn't strong enough yet, any help?
Thanks.
I'd like to move the last several commits I've made to master to a new branch and take master back to before those commits were made. Unfortunately, my Git-fu isn't strong enough yet, any help?
Thanks.
Unless there are other circumstances involved, this can be easily done by branching and rolling back.
git branch my-new-fangled-branch
git reset --hard HEAD~3
git checkout my-new-fangled-branch
But do make sure how many commits to go back.