Reputation: 2437
I accidently merged a project with another project that had nothing to do with it, which I didn't want to do. I successfully unmerged the projects. However, now I want to delete the erroneous commits. How do I do this.
I tried using git rebase, but it doesn't display the merge.
Upvotes: 0
Views: 517
Reputation: 14547
If you have already successfully unmerged the projects (which I assume you did through a git reset --hard HEAD~N), then you need to force the changes onto the "mainline" via a:
git push -f
Please note that this isn't generally advised unless you know for sure that no one pulled from the "mainline" after you accidentally made an undesired commit.
Upvotes: 4