This is my .gitignore:
#ignore all kind of files
*
#except php files
!*.php
All I want is to ignore all kind of files except the .php ones, but with this .gitignore I'm also ignoring folders...
Is there a way to tell git to accept my project folder structure while keeping the track only of the .php files?
It seems like now I can't add folders to my repo:
vivo@vivoPC:~/workspace/motor$ git add my_folder/
The following paths are ignored by one of your .gitignore files:
my_folder
Use -f if you really want to add them.
fatal: no files added
question from:https://stackoverflow.com/questions/24677866/git-ignore-all-files-except-one-extension-and-folder-structure