delete commit and recommit git code example Example: git revert commit but keep changes git reset HEAD^