24

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?

user1941537
  • 6,097
  • 14
  • 52
  • 99

7 Answers7

15

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.

user1941537
  • 6,097
  • 14
  • 52
  • 99
  • 2
    Are you still using and happy with Insync? Any problems at all? – oyalhi Jul 01 '19 at 17:58
  • tried it out, one thing worth mentioning: the advance feature of selective backup (based on rules and patterns) stores the data as appdata of lsync, means you can only see/backup/restore the data using the app and it won't be visible in the file explorer in the cloud. see [here](https://help.insynchq.com/en/articles/5796363-backup-how-it-works?utm_source=insync_app&utm_campaign=open_backup_appdata_help) – Eliav Louski Dec 11 '22 at 23:01
7

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.

JesusIniesta
  • 10,412
  • 1
  • 35
  • 28
2

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 :)

rubn
  • 21
  • 2
1

No need to get other application. You can exclude folder to sync from Google Drive.enter image description here

See https://stackoverflow.com/a/68704427/10355922

bob chen
  • 57
  • 3
0

looks like there is not even an issue for this feature request in their issue tracker, and I'm waiting for this feature to be implemented for years.

I opened a feature request at google drive issue tracker, please star this issue as google prioritized issues based on their stars count.

Eliav Louski
  • 3,593
  • 2
  • 28
  • 52
-1

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.

Gunty
  • 1,841
  • 1
  • 15
  • 27
-2

I had the same issue as you. I found GitHub to work well when I was looking for an alternative.

Kelly Bang
  • 727
  • 6
  • 16
stanwu
  • 11
  • 1
  • I found Stackoverflow to work well when I was looking for an alternative... Wait, what? What alternative you're talking about? – Jerry Green Oct 08 '21 at 19:01
  • Sometimes you have different GH account and want to just share files across your work computer and personal computer so you can just edit the files from other machines instead of doing a commit. In this case, we will need what OP asked. – MasterWil May 21 '22 at 04:04