# get the hashes from the wrong commits with git log
# then revert this commits:
git revert last-commit-hash
# create the correct branch and then checkout to then
git checkout -b right-branch
# then you can re-apply the wrong commit to the right branch
git cherry-pick last-commit-hash
# then all you need is to push the changes and it's done.
Created
October 8, 2017 18:56
-
-
Save dennis90/88f9cd276f04829dc7e7b8b264900db2 to your computer and use it in GitHub Desktop.
What to do when you push to the wrong branch
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment