SyntaxFix
Write A Post
Hire A Developer
Questions
There is a much simpler way to do it (git 1.7.6+):
git status --ignored
See Is there a way to tell git-status to ignore the effects of .gitignore files?