web developer exclude node_modules from sync

TL;DR; File ignore filter example needed to exclude node_modules

I’m trying to sync a large amount of website development projects between my desktop and laptop.

There are two technologies that I use, NPM and Bower which are like package managers.

This means that scattered around my projects are many instances of these /node_modules/ and /bower_components/.

They could be at any level deep but for any place they exist nothing inside them needs syncing as there are thousands of files within them and they can easily be restored via the commandline.

I’ve looked around on these forums but not seeing any examples. Can anyone tell me what I need to put in the filter to achieve this?

A simple

node_modules
bower_components

should do. If you just want to ignore the contents but not the folder themselves you need to add “/*” at the end of each.

1 Like

Thank you that has greatly reduced the amount of files being synced

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.