Reputation: 23522
In git, I accidentally rebased master branch on feature branch. Now I must undo that, but the problem is master doesn't have origin to reset to yet.
How do I undo the rebase of master on feature? And more interestingly, is it possible to actually perform inverted rebase, e.g removing part of history from the branch based on other branch?
Upvotes: 0
Views: 67
Reputation: 31237
What you want is probably more an undo than an inverted rebase.
Use git reflog master
to find out the sha1 of the commit of master before the rebase and do a git reset --hard
.
2 advices before doing that:
Upvotes: 1