I needed a safe method to move the last x commits on my repo to a new branch. Two simple commands to get you there
# this will move the last 3 commits from master into newbranch
git checkout -b newbranch
git branch -f master HEAD~3
Related External Links: