Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Undo a git rebase using onto

Tags:

People also ask

How do I cancel rebase in progress?

If you prefer to skip this patch, run "git rebase --skip" instead. To check out the original branch and stop rebasing, run "git rebase --abort".


I rebased my branch version2 against master using:

git rebase --onto master version1 version2

How can I undo this?

To undo it I did git reflog

Currently, git status (on version2) gives me :

Your branch and 'origin/version2' have diverged,
and have 2563 and 222 different commits each, respectively.
nothing to commit (working directory clean)

I want to undo this rebase.