I always thought I knew how to ignore and deny patterns, but I'm at a dead end. I have a basic Drupal installation, and I would like to ignore everything in the sites/ folder, except for a few specific subdirectories: sites/all and sites/my-project .
.vagrant settings.php # A directory set aside for user contributed assets uploads/ # All we care about is sites/all and sites/my-project www/sites
Given the above .gitignore file in the root of the project when I do git add . I get everything I expect from www/sites/all , but nothing from www/sites/my-project . What am I missing here? There is only one file that excites me ( www/sites/my-project/settings.sample.php ) right now, but I canβt understand why it is not added like everything else.
I know that I can do this, but I want to understand a more serious problem. What am I missing here? Whatever it costs, this is my initial fixation. I do not understand that this matters, but I also do not know that this is not so.
UPDATE
Oops! It seems that one file that excites me is ignored (which explains why the directory is ignored). I have no idea where or why, but it gives me a place to search ...
source share