how to checkout to a previous commit code example
Example 1: git checkout previous commit
git reset --hard HEAD~10
To rollback 10 commits back:
Example 2: git checkout previous commit
$ git reset --hard <commit_id>
git reset --hard HEAD~10
To rollback 10 commits back:
$ git reset --hard <commit_id>