git checkout the latest commit code example
Example 1: command to check recent commit
git log --name-status HEAD^..HEAD
Example 2: git checkout previous commit
git reset --hard HEAD~10
To rollback 10 commits back:
git log --name-status HEAD^..HEAD
git reset --hard HEAD~10
To rollback 10 commits back: