git checkout from previous commit code example Example: git checkout previous commit git reset --hard HEAD~10 To rollback 10 commits back: