V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
primer
V2EX  ›  问与答

Git 如何倒着看历史记录

  •  
  •   primer · 2014-02-26 13:59:54 +08:00 · 2828 次点击
    这是一个创建于 3736 天前的主题,其中的信息可能已经有所发展或是发生改变。
    今天遇到一个特殊使用情况:现在我知道某个commit,想看这个commit之后提交的commit。

    git有"--reverse"这个参数,似乎只能是从最开始的commit开始,不能“git log --reverse <commit>”这样用。

    请问有解决方法吗?谢谢。
    2 条回复    1970-01-01 08:00:00 +08:00
    timonwong
        1
    timonwong  
       2014-02-26 14:22:09 +08:00   ❤️ 1
    git log --reverse <commit_id_start>..[commit_id_end]

    commit_id_end可忽略
    primer
        2
    primer  
    OP
       2014-02-26 14:46:02 +08:00   ❤️ 1
    @timonwong

    Thanks! 有效!!
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2585 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 12:47 · PVG 20:47 · LAX 05:47 · JFK 08:47
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.