Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 936
user1941537 Avatar asked Mar 01 '19 09:03

user1941537


People also ask

How do I exclude files from Google Drive sync?

In Backup and Sync Preferences, click Change in the “My Computer” section to choose which files sync. You can now ignore files by extension. In the “My Computer” section of Backup and Sync Preferences, click Change Advanced settings, and then enter the file extensions to ignore.

How do I exclude folders in Google Drive?

On the Shared Drives Settings, click Edit. On the Backup & Retention > Settings, two options are displayed - Use Default and Custom. The Use Default option when selected inherits settings from the Auto Configuration where you can add the exclusion for folders as well.

How do I stop a subfolder from syncing in Google Drive?

Select which subfolders sync to your computer To do this, click Preferences > Sync Options > Only these folders… Here, you'll be presented with a list of subfolders from Google Drive that you can check or uncheck to enable or disable syncing.

How do I exclude folders from backup and sync?

Check the “sync only these folders” box in the “Google Drive” tab. Go through your folders and uncheck anything you don't want to backup. You should check this regularly if you don't want a new folder to sync. Choose what you want to sync between your computer and the cloud.

What happens if I remove/node_modules from drive sync?

Removing the "/node_modules/" folder from the Drive Sync option tells me that the folder will not be available on my computer, but will still be available online on Google Drive. That's exactly the opposite of what I'm looking for.

How to sync only some folders in Google Drive?

4. On the left sidebar, click on "Google Drive" (Sync some folders) 5. On the right side, Click the radio circle that says "Sync only these folders..." 6.

How to exclude some files from sync folder?

How to exclude some files from sync folder? *.sb-????????-?????? *~.* .* Community content may not be verified or up-to-date. Learn more. You can choose to not sync certain file types on your computer. On your computer, click Backup and Sync . Click More Preferences. At the right, click Change. Click Advanced settings.

How do I exclude node_modules from Dropbox?

Programmatically instruct Dropbox to ignore certain files via scripts like DropboxIgnore or .dbignore. However, these seem somewhat hacked together or don’t support the latest versions of Dropbox, nor Google Drive at all. Use selective sync to manually exclude node_modules for each project (as mentioned above).


2 Answers

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.

like image 141
user1941537 Avatar answered Sep 19 '22 12:09

user1941537


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.

like image 40
JesusIniesta Avatar answered Sep 18 '22 12:09

JesusIniesta