How to sync only concrete subfolders?

I have several folders in my sync folder (it`s maven local repo folder): org/, com/, net/, mydomain/, mydomain2/ etc. But I need to sync only mydomain/ and mydomain2/ with their subfolders. So I suggest using such .stignore:

**
!mydomain
!mydomain2

What am I doing wrong? In near future the number of such folders may increase so I don`t want to sync each of them separately.

Thanks in advance.

Order is wrong because first match wins

1 Like

Thank you a lot! I missed that when reading the documentation.