nextcloud / desktop

💻 Desktop sync client for Nextcloud
https://nextcloud.com/install/#install-clients
GNU General Public License v2.0
3.01k stars 793 forks source link

Add option to make exceptions to the exclusion list #5456

Open smihael opened 1 year ago

smihael commented 1 year ago

Currently, the desktop client can be configured to exclude specific folders from sync based on some pattern in the sync-exclude.lst file.

To implement feature as suggested in #4889, it would be great if one could make exceptions.

For example, to allow the syncing of the .git/config file while excluding the rest of the repository containing .git folder, one could use the following exclusion rules:

**/.git/**
!.git/config

This should exclude all files and folders within the git repository (and the git folder) from being synced, but should keep the .git/config file in the sync. The second line of the rule, starting with exclamation mark, would be a negation that excludes the .git/config file from the previous exclusion rule, similarly as in .gitignore.

This option would be much more general than making a git specific feature.

danstoian07 commented 6 months ago

That would be great. I have "/vendor" that I want to exclude. But I have "/resources/views/vendor" that I want to include.