'Excluding node_modules folders from syncing with Google Drive
Is there any way to exclude node_module folder from getting sync with Google Drive? If it's not possible with Google Backup and Sync, is there any other app for Mac, which can do that?
Solution 1:[1]
As no one has answered my question, I'm going to report back. I hope it helps others.
Ideally, you should store your project folders outside of your GoogleDrive folder on your machine and back up them using GitHub and co.
However, if you like me wants to keep your project folder inside of your GoogleDrive folder, but don't want to sync node_module folders with GoogleDrive, you can use a fantastic app called Insync, which allows you to exclude files and folders from syncing with GoogleDrive.
Ok, it costs a bit, but you pay only once and it's totally worth it.
If you ask for it, you might even get some discount.
Solution 2:[2]
To exclude folders on Windows, I use a simple Powershell script that relocates the desired folders (node_modules) to a different location outside Google Drive, and replaces them with Symbolic links so everything keeps working.
The repo can be found here, along with the instructions to set it up.
Solution 3:[3]
I know this is an old question, i had this issue too. Just in case someone drops here or the author is still interested... I ended up using a similar service named Koofr, you have 2 GB for free, their sync client works really well (better than the drive's one, for sure).
You can create a .syncignore file, similar to .gitignore, and add all the ignored folders/files you want, the client won't sync those folders/files.
Tip: if you create the .syncignore file before installing the koofr client, it won't start uploading those folders/files, and you won't have to remove it from koofr after :)
Solution 4:[4]
Solution 5:[5]
Google Drive allows you to sync files from any locally stored folder. What I do is that I store my repository on my desktop
, and just sync up the src
file. This way, even if something goes terribly wrong, the majority of my work is backed up in the cloud.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | user1941537 |
Solution 2 | JesusIniesta |
Solution 3 | rubn |
Solution 4 | bob chen |
Solution 5 | Gunt.r |