Bitbucket, accidentally pulled wrong branch
This question already has an answer here:
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^
上一篇: 通过拉取请求撤消合并?
下一篇: Bitbucket,不小心拉错了分支