git
› Pro Git
› Atlassian Git Tutorial
› Pro Git 简体中文翻译
› GitX
xudzhang
V2EX  ›  git

怎么查看 Git 工程远端某分支上,两次提交之间,某个用户修改过的文件的列表?

  •  
  •   xudzhang · Dec 10, 2018 · 2608 views
    This topic created in 2914 days ago, the information mentioned may be changed or developed.
    3 replies  •  2018-12-10 17:38:02 +08:00
    hongch
    hongch
    Dec 10, 2018❤️1
    1
    git checkout [第二次提交节点]
    git diff
    这样不就可以看见第二次在第一次的基础上修改了哪些文件?
    SingeeKing
    SingeeKing
    Dec 10, 2018❤️2
    2
    git-diff - Show changes between commits, commit and working tree, etc

    git diff [<options>] <commit> <commit> [--] [<path>...]
    This is to view the changes between two arbitrary <commit>.

    --name-status
    Show only names and status of changed files. See the description of
    the --diff-filter option on what the status letters mean.

    因此用法:git diff --name-status 提交 1 提交 2
    wjfz
    wjfz
    Dec 10, 2018
    3
    checkout 到本地,找到两次提交的日期

    git log --author="你想查的用户名" --since=2018-12-05 --before=2018-12-10 --oneline --name-status


    感谢楼上提供--name-status 这个参数,看了下 git log 命令也支持这个参数。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   927 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 20:10 · PVG 04:10 · LAX 12:10 · JFK 15:10
    ♥ Do have faith in what you're doing.