how to delete from a past commit on github code example Example: git cancel last commit git reset --soft HEAD~1