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'
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…