git ignore all files except one extension and folder structure
问题 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