currenty I have an repository that looks like this:
Git-Repository
└─── A
│ └─── X
│ └─── Y
└─── B
│ └─── X
│ └─── Y
└─── C
│ └─── X
│ └─── Y
│ ....
I want to edit my .gitignore file to somehow ignore all X subdirectories except the one in C directory.
It is important to mention that this is a simple version of my real repo. I actually have a LOT more folders and subfolders, so I cant set all the directories one by one.
Edit1: This is what I am trying to do, but not working. X subdirectory is being correcyly ignored, but the one in "C" isnt ""unignored""
X/
!C/X/*