I happened to pull the wrong branch as I was supposed to pull the master branch but ended up pulling the development branch. This did merge my local repo. However, I would not like to merge the Bitbucket repo. Is there any way to reverse the pull or delete the merge request (see image)?
EDIT:
I haven't pushed any changes to my Bitbucket yes (as stated in the image).
git reset
will help you achieve this. More info at man git-reset.
In this specific case you are looking to reset your branch so that it points to the first parent of the merge commit, which is the commit on master
right before the merge.
First, run git status
to make sure you have no uncommitted changes, as the next command will delete them.
Then proceed to reset to the first parent:
git reset --hard HEAD^
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With