revert back to a commit github code example
Example 1: how do i get the last commit
$ git reset --soft HEAD~1
Example 2: how discharge changes e recover last commit git
git reset HEAD --hard
$ git reset --soft HEAD~1
git reset HEAD --hard