V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
game3108
V2EX  ›  问与答

git 怎么把一个作者的 diff 打出来?或者是一系列的 commit id 打成一个 diff?

  •  
  •   game3108 · Sep 9, 2016 · 3173 views
    This topic created in 3524 days ago, the information mentioned may be changed or developed.

    求指点,因为要做 code review ,但提交比较多,跨度也比较长,想打个 diff 出来。 请问 git 有办法把一个作者的 commit 打成 diff 出来么?

    如果有的话最好,没有的话,我自己尝试用 git log --author --pretty=format 把某个 author 的所有 commit id 导出一个文件,那 git 有办法把一系列的 commit id 打成同一个 diff 么?

    非常感谢。

    4 replies    2016-09-12 10:30:50 +08:00
    ik0r
        1
    ik0r  
       Sep 9, 2016   ❤️ 2
    git log --author=AUTHOR --patch
    game3108
        2
    game3108  
    OP
       Sep 9, 2016
    @Jeremial 牛逼。。我自己试了半天。原来一个--patch 就可以了。。
    malkavia
        3
    malkavia  
       Sep 9, 2016
    @Jeremial 赞一个
    @game3108 拿 git diff 来做 code review 太累了吧,还是拿 gui 工具好看一点吧
    game3108
        4
    game3108  
    OP
       Sep 12, 2016
    @malkavia 我也在找怎么能够把 git diff 弄成 gui 的工具。。我用 sourcetree 我只会一个一个的去看修改的 commit ,可以看到 gui ,但怎么一起看不会。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2670 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 48ms · UTC 04:00 · PVG 12:00 · LAX 21:00 · JFK 00:00
    ♥ Do have faith in what you're doing.