Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Revert a merge commit/push to the origin?

Trevor Stull October 20, 2016

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

0 votes
Seth
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 21, 2016

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

From Marcus Ericsson's answer: http://stackoverflow.com/a/1973304/1476926

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
TAGS
AUG Leaders

Atlassian Community Events