delete comits local git code example Example: git delete commit 4785cd1e041 git reset --hard <sha1-commit-id>