reflog hard rebase

Source

git reflog                   # find HEAD commit of the branch as it was before rebasing
git reset --hard "HEAD@{x}"  # where "HEAD@{x}" is the commit before rebasing