Show ignored files in git - Stack Overflowによれば、gitignoreで無視されているファイルを調べるにはいくつかコマンドがあるらしい。
check-ignore
コマンド
zshだとうまく動いた。bashは4以上じゃないとだめらしい。
$ git check-ignore **/*
Godeps/_workspace/pkg
Godeps/_workspace/pkg/linux_amd64
Godeps/_workspace/pkg/linux_amd64/golang.org
Godeps/_workspace/pkg/linux_amd64/golang.org/x
Godeps/_workspace/pkg/linux_amd64/golang.org/x/tools
Godeps/_workspace/pkg/linux_amd64/golang.org/x/tools/cover.a
cover.out
clean
コマンド
clean
はトラックされてないファイルを取り除くコマンドだが、取り除く予定のものを調べることができる。
$ git clean -ndX
Would remove .vagrant/
Would remove Godeps/_workspace/pkg/
Would remove cover.out
status
コマンド
statusコマンドでも調べられる。
$ git status --ignored -s
!! .vagrant/
!! Godeps/_workspace/pkg/
!! cover.out