Git日志:未来修订的日志

时间:2012-02-20 13:18:08

标签: git

当我检查以前提交的git存储库时,'git log'不再显示在当前检出的提交之后提交的提交。

所以,问题是:如何在当前签出的提交之后获取提交日志?

2 个答案:

答案 0 :(得分:20)

您可以使用--all标志查看所有修订,如

git log --all

如果您只是对未来的修订感兴趣,也可以使用

git log ..@{1}      # assuming you just switched from the future master
git log ..abcdef    # assuming abcdef is the newest future commit

答案 1 :(得分:2)

问题是:你不知道孩子们提交,只有父母的评论 如果你直接签出提交SHA1,你就在Detached HEAD mode(即不在任何分支上)。

一个可能的解决方案是列出包含您的提交的所有分支:“How to know which branch a “git log” commit belongs to?” 然后为每个分支做一个git日志。