primer
V2EX  ›  问与答

Git 如何倒着看历史记录

  •  
  •   primer · Feb 26, 2014 · 3468 views
    This topic created in 4571 days ago, the information mentioned may be changed or developed.
    今天遇到一个特殊使用情况:现在我知道某个commit,想看这个commit之后提交的commit。

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

    请问有解决方法吗?谢谢。
    2 replies    1970-01-01 08:00:00 +08:00
    timonwong
        1
    timonwong  
       Feb 26, 2014   ❤️ 1
    git log --reverse <commit_id_start>..[commit_id_end]

    commit_id_end可忽略
    primer
        2
    primer  
    OP
       Feb 26, 2014   ❤️ 1
    @timonwong

    Thanks! 有效!!
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   5154 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 01:11 · PVG 09:11 · LAX 18:11 · JFK 21:11
    ♥ Do have faith in what you're doing.