The easiest way to undo a rebase is to find the relevant commit as it was immediately before the rebase using git reflog. You can then reset to that commit; e.g.: git reset --hard HEAD@{50} More