How can I list all the deleted files in a Git repository?

后端 未结 8 794
不思量自难忘°
不思量自难忘° 2020-11-30 16:13

I know Git stores information of when files get deleted and I am able to check individual commits to see which files have been removed, but is there a command that would gen

8条回答
  •  余生分开走
    2020-11-30 16:43

    Since Windows doesn't have a grep command, this worked for me in PowerShell:

    git log --find-renames --diff-filter=D --summary | Select-String -Pattern "delete mode" | sort -u > deletions.txt
    

提交回复
热议问题