Git diff --name-only and copy that list

后端 未结 7 893
眼角桃花
眼角桃花 2021-01-29 18:55

I just want to get a list of changed files between two revisions, which is simple:

git diff -–name-only commit1 commit2 > /path/to/my/file

B

7条回答
  •  不要未来只要你来
    2021-01-29 19:10

    No-one has mentioned cpio which is easy to type, creates hard links and handles spaces in filenames:

    git diff --name-only $from..$to  | cpio -pld outdir
    

提交回复
热议问题