commit reset head code example
Example 1: git reset head of master
git fetch origin
git reset --hard origin/master
Example 2: how do i get the last commit
$ git reset --soft HEAD~1
git fetch origin
git reset --hard origin/master
$ git reset --soft HEAD~1