I have one directory tree with many kind of different files. There are 300 directories on the parent directory. Each directory could have other sub directories.
I only want to track *.cocci on all sub directories. Here is my .gitignore:
*
!*.cocci
But it do not work, as the files on sub directories are not tracked. How can I tell git that I only want to track *.cocci on all sub directories?