How to recover from bad merge

I am using SourceTree to manage a BitBucket Git repository. I did a merge a couple weeks ago, but I must have goofed it up. I do not see any of the changes from the merged branch in master. When I try to merge the branch again, no changes are getting merged. I have made multiple commits in the master branch since this merge. How can I redo this merge without losing the work done in the subsequent commits.

3 answers

This widget could not be displayed.

I'm not sure we can tell you how to fix it without a more specific idea of what went wrong. Did one of the subsequent commits somehow revert your changes?

This widget could not be displayed.

None of the subsequent commits refer the files that should have been merged. What is also odd is that the commit created by the merge does not include any of the files that I would expect to find.

This widget could not be displayed.

You might try creating a branch off of master on the commit prior to the original (faulty) merge, then merge from your other branch into this new one, and see what that branch looks like after the merge.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in Teamwork

What teamwork quotes inspire you?

Hey everyone! My name is Natalie and I'm an editor of the Atlassian Blog and I've got a question for you: What's your favorite quote about teamwork?  We've compiled a list here, along with...

151 views 16 7
Join discussion

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