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