Recover from an unsuccessful git rebase with the git reflog command

The git rebase command allows you to adjust the history of your Git repository. It’s a useful feature, but of course, mistakes can be made. As is usually the case with Git, you can repair your error and restore your repository to a former state. To recover from an unsuccessful rebase, use the git reflog command.

Source: LXer – Recover from an unsuccessful git rebase with the git reflog command