cancel a merge git
git merge --abort
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
git undo merge
git reset --hard HEAD~1
git reset --hard <commit_sha>
revert last merge git
git revert -m 1 commit_hash
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