how do i revert back to my last commit in git code example Example: roll back last commit in git git reset --soft HEAD~1