List all the files that ever existed in a Git repository

后端 未结 4 520
夕颜
夕颜 2020-11-30 17:05

Do you have a clean way to list all the files that ever existed in specified branch?

4条回答
  •  攒了一身酷
    2020-11-30 17:44

    This does the right thing for checking if a filename was ever present in the repo not just on the current branch.

    git log --all --pretty=format: --name-only --diff-filter=A | sort - | grep fubar
    

提交回复
热议问题