英文:
How to show git reflog in reverse order?
问题
For git log, we have git log --reverse to show logs in the reverse order, but I tried git reflog --reverse, it returns fatal: options '--reverse' and '--walk-reflogs' cannot be used together. Is there any way to show git reflog in reverse order?
对于 git log,我们有 git log --reverse 以倒序显示日志,但我尝试了 git reflog --reverse,它返回 fatal: options '--reverse' and '--walk-reflogs' cannot be used together。有没有办法以倒序方式显示 git reflog?
英文:
For git log, we have git log --reverse to show logs in the reverse order, but I tried git reflog --reverse, it returns fatal: options '--reverse' and '--walk-reflogs' cannot be used together. Is there any way to show git reflog in reverse order?
答案1
得分: 1
大多数系统都有tac可用。由于reflog是一个平面列表(而不是图形),您可以简单地反转列表输出:
git reflog | tac
英文:
Most systems have tac available. Since the reflog is a flat list (and not a graph), you could simply reverse the list output:
git reflog | tac
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。


评论