I need to ignore all files except those ending in .php, .css, .html or .js.
This is what I have in my .gitignore file for now:
*
!.php
!/*.php
!*.php
It does ignore everything, but only permits .php files in root directory, while hiding all the rest.