查看 .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