I accidentally did some unattached commits to the repository and couldn't find them later.
Thanks to the google-oriented programming, I finally find the way to get the lost commits back ✌️
We can use
git log --reflog to list all recent commits and then
cherry-pick each commit to the current branch.