5

I want to sync up my dev folder including various project folders, each having node_modules folder inside. I would like to exclude all node_modules subfolders.

Here is an example of my file structure:

. ├── projectOne │ ├── index.app │ ├── node_modules │ ├── package.json │ └── src └── projectTwo ├── node_modules ├── package.json └── src

The root folder has .SyncIgnore file for excluding specific folders and files, but I do not know how to exclude ALL node_modules subfolders.

*/node_modules do not work.

Pavel Binar
  • 325
  • 2
  • 4
  • 11

1 Answers1

6

Great reference document: http://antimatrix.org/BTSync/Documentation/BTSync_Notes.html#Using_SyncIgnore_file

You should use either of these to ignore node_modules:

# ignore node_modules on every level in hierarchy
node_modules
# ignore node_modules only on the second level
/*/node_modules
StayOnTarget
  • 1,178
  • 1
  • 14
  • 26
user321933
  • 76
  • 1