Clear Example for drush rsync exclude paths I've seen many exclude path examples here on stack exchange. But I can't figure out the way to make it work.

To keep it simple :

We have two aliases @self  and @live 

we have a theme called themename in /sites/all/themes/themename

in the theme folder we have a subdirectory called node_modules because of the use of gulp in our development workflow.

How can we make sure to exclude /sites/all/thems/themename/node_modules/ when syncing with drush rsync @self @live ?
drush rsync has an  --exclude-paths parameter that will allow you to exclude your node_modules directory.

Have a look at the parameters for rsync. 

You should be able to do something like :

drush --exclude-paths=sites/all/themes/themename/node_modules rsync @self @live 


Because the Drush rsync command uses strict option handling, the --exclude-paths option must appear before the rsync command name.