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