hot to abandon an unfinished git commit code example Example: git revert last commit unpushed git reset --soft HEAD~1