[ACCEPTED]-Creating git branch after many commits-branch
git checkout -b newbranch or as suggested below, simply 7 do a
git branch newbranch to create the new branch without switching 6 to it.
This will create a branch that is 5 at your current commit at master. Once 4 done:
git checkout master
git reset --hard <commit_hash>
<commit_hash> should be replaced 3 by the commit ID you want master rolled 2 back to.
Now you can switch to your new branch 1 and push it out to the remote.
git checkout newbranch git push origin newbranch
More Related questions