檢視 .gitignore 配置忽略哪些檔案

[ alias ]

    ignored = ! git ls-files --others --ignored --exclude-standard --directory \
            && git ls-files --others -i --exclude-standard

每個檔案顯示一行,因此你可以 grep(僅限目錄):

$ git ignored | grep '/$'
.yardoc/
doc/

或計數:

~$ git ignored | wc -l
199811                 # oops, my home directory is getting crowded