undo git rebase

C++
git reflog
git reset --hard ORIG_HEAD
git reset --hard HEAD@{5}

Source

Also in C++: