Revert a merge commit/push to the origin?

I screwed something up with my whole team by modify a file that someone else modified and tried merging it into the same commit that they had a very stupid mistake and now I have no idea how to remove/revert it, i have tried revert commit but returns an error as seen in the photo below. I have tried doing a hard reset to a stable commit but it doesn't delete the ones ahead of it like people in other questions said. But now this broken version is on the remote branch with Bitbucket so people can't push anything till they have pulled which we obviously don't want because the stuff they pull is broken.

See photo for a better explaination i really have no idea how to explain this first time using version control and it was going so well till now... sad


commit eed6fba is what i want to revert back to. commit 0ed8b84 needs to be removed.

Screenshot (39).png

Screenshot (38).png

1 answer

You'll have to go to the command line for this.

From Marcus Ericsson's answer:

To revert a merge commit, you need to use: git revert -m . So for example, to revert the recent most merge commit using the parent with number 1 you would use:
git revert -m 1 HEAD 

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 14, 2019 in Bitbucket Pipelines

Building a Bitbucket Pipe as a casual coder :  #!/bin/bash source "$(dirname "$0")/" enable_debug extra_args="" if [[ "${DEBUG}" == "true" ]]; then extra_args="--verbose" fi # mandatory variables R...

274 views 0 12
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you