Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

.gitignore match folder substring

I have folders in a project that always have .X at the end. In each of these folders, subfolders must be ignored. I am not able to get the filter to work. The .X part must be matched.

Example directory:

.git
foo/one.X/folder_to_ignore
bar/two.X/folder_to_ignore

Thins I tried, that did not work:

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

*.X/folder_to_ignore
*X/folder_to_ignore
**.X/folder_to_ignore
**X/folder_to_ignore
*.*.X/folder_to_ignore (regex?)

And some other variations of that sort.

Thanks.

>Solution :

Try with:

*.X/folder_to_ignore/
**/*.X/folder_to_ignore/

Let me know if it worked.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading