go back to commit in git bash code example
Example 1: roll back last commit in git
git reset --soft HEAD~1
Example 2: revert git commit
git revert <the_commit_hash>
Example 3: get back some commits git
git revert {commit_id}'
Example 4: git revert to repo version
git fetch origin
git reset --hard origin/master