Skip to content

Instantly share code, notes, and snippets.

@richy486
Created February 28, 2017 21:05
Show Gist options
  • Save richy486/81ca3abe02912c5b71d25363f92ed8e5 to your computer and use it in GitHub Desktop.
Save richy486/81ca3abe02912c5b71d25363f92ed8e5 to your computer and use it in GitHub Desktop.
how to undo a github merge to the wrong branch
if you merged 'someUpdate' branch into 'wrongBranch' branch
do this on 'wrongBranch'
$ git reset --soft HEAD^
$ git push -f origin HEAD^:wrongBranch
$ git push
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment