Ignore arbitrary subdir in path not working

Currently I wish to ignore two extensions *.raw and *.log BUT only if they are under a specific “root” folder.

Taking advantage of supposed .gitignore syntax support I wrote

LTSpice/**/*.raw
LTSpice/**/*.log

where ** should match ANY folder(s) (even no folder). However I’m seeing files being synced regardless.

Is the .gitignore syntax only partially supported? This git feature is ~10y old

Thanks in advance for any tips / help

Hi @aleperno! :slight_smile:

The rule seems to be correct. I just tried it on my end, in this case with PNG files and they are ignored upon entering this rule: Root Folder/**/*.png.

Can you please send the screenshots of where these .raw and .log files are in your folder hierarchy? You can email them to support@insynchq.com with the link to this post.

Sure here are the requested screenshots

Ingore Rules definitions:

Full path of the folder + creation of test file

The test file gets updated

@aleperno Can you try the following rule instead:
Analisis de Circuitos/LTSpice/**/.raw
Analisis de Circuitos/LTSpice/**/.log

Hi @mia, testing Analisis de Circuitos/LTSpice/**/*.raw did not work

However you gave me an idea and tested the path relative to my root folder

FACU (drive)/Analisis de Circuitos/LTSPice/**/*.raw does work
also tested
**/LTSPice/**/*.raw and also works.

Upon further reading of Git Ignore Pattern Documentation I found out if I defined a path (rather than a single directory), it is considered as relative to the ‘root’ folder.

Therefore, my mistake.
Thanks for the assistance!

Ah! Wonderful to know that you got this sorted out :slight_smile: Thank you for the update, I appreciate it @aleperno.