git can you undo a rebase code example Example: git undo rebase git reflog # determine pre-rebase head number, N git reset --hard HEAD@{N}