retreive prevous status before rebase git code example Example: undo git rebase git reset --hard HEAD@{5}