-g, --walk-reflogs
Instead of walking the commit ancestry chain, walk reflog entries from
the most recent one to older ones.
所以你可以这样做,在一个悬空的提交消息中找到一个特定的字符串:
git log -g --grep=search_for_this
或者,如果你想搜索特定字符串的变化,你可以使用十字镐搜索选项,"-S":
git log -g -Ssearch_for_this
# this also works but may be slower, it only shows text-added results
git grep search_for_this $(git log -g --pretty=format:%h)