git co old commit code example
Example 1: git checkout commit
git checkout <commit>
Example 2: git checkout previous commit
git reset --hard HEAD~10
To rollback 10 commits back:
git checkout <commit>
git reset --hard HEAD~10
To rollback 10 commits back: