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

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

  •  
  •   game3108 · 2016-09-09 18:23:28 +08:00 · 2751 次点击
    这是一个创建于 2798 天前的主题,其中的信息可能已经有所发展或是发生改变。

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

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

    非常感谢。

    4 条回复    2016-09-12 10:30:50 +08:00
    Jeremial
        1
    Jeremial  
       2016-09-09 18:34:07 +08:00   ❤️ 2
    git log --author=AUTHOR --patch
    game3108
        2
    game3108  
    OP
       2016-09-09 18:38:30 +08:00
    @Jeremial 牛逼。。我自己试了半天。原来一个--patch 就可以了。。
    malkavia
        3
    malkavia  
       2016-09-09 19:22:28 +08:00
    @Jeremial 赞一个
    @game3108 拿 git diff 来做 code review 太累了吧,还是拿 gui 工具好看一点吧
    game3108
        4
    game3108  
    OP
       2016-09-12 10:30:50 +08:00
    @malkavia 我也在找怎么能够把 git diff 弄成 gui 的工具。。我用 sourcetree 我只会一个一个的去看修改的 commit ,可以看到 gui ,但怎么一起看不会。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5572 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 41ms · UTC 07:45 · PVG 15:45 · LAX 00:45 · JFK 03:45
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.