First step
echo "1111111111" >> test.txt && git commit -m "1"
echo "2222222222" >> test.txt && git commit -m "2"
git rebase -i HEAD~2
Next change the configuration similar to the following
s hash 1
p hash 2
Then the git will tell you that you made a mistake
git rebase --edit-todo
//set the configuration similar to the following
//it's worth noting that 'p hash 2' doesn't show up
p hash 1
git rebase --continue
Finally, the second commit disappeared!
Is that normal? Is there any way to get the Git repository back to where it was before git rebase -i HEAD~2 was executed?