# Checkout the desired branch git checkout # Undo the desired commit git revert # Update the remote with the undo of the code git push origin