how to revert code to previous commit using git code example
Example 1: git checkout previous commit
git reset --hard HEAD~10
To rollback 10 commits back:
Example 2: get back some commits git
git revert {commit_id}'
git reset --hard HEAD~10
To rollback 10 commits back:
git revert {commit_id}'