git delete commit but keep changes code example Example: git reset keep changes git reset HEAD^ --soft