cancel a merge git
git merge --abort
git undo merge
git reset --hard HEAD~1
git undo merge
$ git reset --hard HEAD~1
how to revert a merge locally
git reset --hard <cbm>
where cbm is the commit number before the merge you want to revert
to get a list of all the merges you can use the following line
git log --graph
and then use the commit number from the one before the merge you want to revert
Undo git merge
git reset --merge HEAD~1
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us