I have the following project structure:
A
├── a.py
├── B
│ └── b.py
└── C
where I would like to ignore all contents of A
, but include all *.py
files recursively.
My .gitignore
looks like this:
A/*
!A/**/*.py
which does not seem to give the desired behavior - only a.py
is tracked in this case. What am I missing? I would like to avoid defining subdirectory-specific rules like !A/B/*.py
.