## An opinionated nextcloud ignore list for developers (sync-exclude.lst) The latest nextcloud server versions will have ransomware detection automatically enabled, meaning that syncing common developer file types (e.g. `.lock`) will return errors. > Fatal webdav OCA\DAV\Connector\Sabre\Exception\Forbidden: Ransomware file detected. Prevented upload of ..py/bokeh/secrets.tar.enc because it matches extension pattern ".enc" If you are syncing complex, nested work directories as a developer, the following list can be used, as a starting point, to exclude certain common file types and folders. Examples: - `.git/`: folder will not be synced (but the latest files checked out, will) - `node_modules/`: (JS) will not be synced, preventing syncing of a massive quantity of unnecessary dependencies - `cython_debug/`: C-Extensions for Python debug directories - `_site/`: Commonly used for building static sites and serving temporary files (`mkdocs serve`, `hugo serve`) The motivation behind this approach is that Nextcloud should not be used as a backup solution, but for syncing working files. For instance, if you want to continue working at home on selected files (`*.md`, `*.odt`), this will be possible. For checking out the latest git repositories, or dependencies, use the native approach (e.g. `git pull` for repositories, `npm install` for `node_modules/`). Note: The file list is not exhaustive, please comment or update. ## Setup Clone this gist: ``` git clone git@gist.github.com:280afdb2f994fae6e5f6b183888f659d.git mv 280afdb2f994fae6e5f6b183888f659d nextcloud_ignore_gist cd nextcloud_ignore_gist ``` Copy `sync-exclude.lst` file to: ``` %AppData%/Nextcloud/sync-exclude.lst ```