更新时间:2022-12-22 20:33:00
如果您想列出分支 master
下的所有当前正在跟踪的文件,您可以使用以下命令:
If you want to list all the files currently being tracked under the branch master
, you could use this command:
git ls-tree -r master --name-only
如果您想要一个曾经存在的文件列表(即包括已删除的文件):
If you want a list of files that ever existed (i.e. including deleted files):
git log --pretty=format: --name-only --diff-filter=A | sort - | sed '/^$/d'