reset last commit unpushed code example Example: git revert last commit unpushed git reset --soft HEAD~1