I have the following directory structure:
/app
/src
/MyProject
/FirstProject
/Controller
/file-1-1.php
/file-1-2.php
/file-1-3.php
/Resources
/view-1.html.twig
/view-2.html.twig
/SecondProject
/Controller
/file-2-1.php
/file-2-2.php
/file-2-3.php
/Resources
/view-3.html.twig
/view-4.html.twig
/vendor
/web
I would like to ignore all files in my repository except files in /src/MyProject/SecondProject/Resources
.
I have tried many ways but without success. GitHub application does not detect a directories that I want. Usually this application does not detect any file or detects all, so I am confused.
I tried:
# IGNORE:
app/
src/
vendor/
web/
# ALLOW:
# my first attempt:
!src/MyProject/SecondProject/Resources/*
# second attempt:
!src/MyProject/SecondProject/Resources/**/
# third attempt:
!src/MyProject/SecondProject/Resources/**/*
I haven't found a solution in an other questions!