Get a list of all git commits, including the lost ones
- 2019-11-19
- Git
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.
References: Get a list of all git commits, including the lost ones