I have a .gitignore file in which I ignore everything, and then un-ignore specific files and directories. However, one part of it doesn't seem to work.
/*
!.gitignore
!Makefile
!include/
!src/
!test/*.cc
**.swp
New *.cc files in the test directory don't appear in git status.