how to revert to previous commit github code example
Example 1: how to revert back to previous commit in git
git reset --hard 0d1d7fc32
git stash
git reset --hard 0d1d7fc32
git stash pop
Example 2: github restore previous commit
git revert <commit>
git revert 99a5c5905e12c74725bae64c61efce140662ce24
Example 3: git go back to previous commit
git checkout 12feg3435
Example 4: github undo last pushed commit
git reset <previous label or sha1>
git commit -am "blabla"
git push -f <remote-name> <branch-name>