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