how to delete commit in git local code example Example: remove the commit from local git reset --soft HEAD~1