github revert merged commit code example Example: recover a merged commit git git checkout -b remerge master git merge branch -s ours