git command to revert back to previous commit code example
Example 1: roll back last commit in git
git reset --soft HEAD~1
Example 2: revert back to a commit git
git reset --hard 4a155e5
Will move the HEAD back to where you want to be
git reset --soft HEAD~1
git reset --hard 4a155e5
Will move the HEAD back to where you want to be