<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Sherwin Garcia-Obregon on Medium]]></title>
        <description><![CDATA[Stories by Sherwin Garcia-Obregon on Medium]]></description>
        <link>https://medium.com/@sherwino?source=rss-48cbc1eeaaa6------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*wtYeGYTKICcIixSU6XY3Eg.jpeg</url>
            <title>Stories by Sherwin Garcia-Obregon on Medium</title>
            <link>https://medium.com/@sherwino?source=rss-48cbc1eeaaa6------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 18:41:03 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sherwino/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How do you ignore specific folders like node_modules recursively on Dropbox?]]></title>
            <link>https://medium.com/@sherwino/how-do-you-ignore-specific-folders-like-node-modules-recursively-on-dropbox-c74ba9f2abce?source=rss-48cbc1eeaaa6------2</link>
            <guid isPermaLink="false">https://medium.com/p/c74ba9f2abce</guid>
            <category><![CDATA[node]]></category>
            <category><![CDATA[backup]]></category>
            <category><![CDATA[dropbox]]></category>
            <category><![CDATA[git]]></category>
            <dc:creator><![CDATA[Sherwin Garcia-Obregon]]></dc:creator>
            <pubDate>Sat, 25 Aug 2018 22:10:21 GMT</pubDate>
            <atom:updated>2018-08-28T03:25:52.877Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7hxutI2DxRSUQPAWCuglMA.jpeg" /><figcaption>British Library’s Low Oxygen Archive</figcaption></figure><p><strong>You don’t.</strong></p><p>Nobody could deny the utility of Dropbox, it is an incredibly useful tool.<br>The ability to be able to work on one computer and just pick up where you left off on another is great.</p><p>The best part about it is that cloud based synchronization is a feature that can be utilized by pretty much every industry. As a Software Developer I use Dropbox to synchronize and backup code from workstation to workstation with ease. Others may use it for collaboration or to transmit large files that are difficult to email.</p><p>Developers use a lot of tools to make sure they have some kind of version control to keep track of all the changes that a project has gone through, because things break.</p><p>One of the most common tools is Git. This software creates a hidden .git folder that contains a variety of information needed to help Git catalog and keep track of all your files.</p><p>If you want to learn more about it you could read <a href="https://medium.freecodecamp.org/understanding-git-for-real-by-exploring-the-git-directory-1e079c15b807">this article</a> by a developer trying to make sense of its structure, or you could go directly to <a href="https://git-scm.com/">Git’s website.</a></p><p>I mention Git for two reasons:</p><ul><li>The .git folder could have thousands of files, for a small project.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/558/0*fOuAAyKdE8HNCQsX" /></figure><p>Screenshot of .git folder</p><ul><li>…and Git has a special file <a href="https://git-scm.com/docs/gitignore">.gitignore</a> that could tell the Git program to ignore folders or files, <a href="https://www.atlassian.com/git/tutorials/saving-changes/gitignore">recursively</a>.</li></ul><p>People have the tendency of using the Dropbox folder as an active working directory because it is convenient to have a file uploaded to the cloud as soon as you press save. I used to do the same until I started running into issues.</p><p>Dropbox is incredibly practical, if I randomly dropped my laptop in to a large body of water I would be able to pull out my phone and continue working as if nothing happened. Had I not dropped my laptop into that body of water I would have used Git to commit all of the changes I did to my code after completing certain tasks. Git keeps track of the specific changes you make to your code so if you changed the name of a variable from,</p><pre>const customersFirstName = &quot;Bob&quot;;</pre><p>to</p><pre>const name = &quot;Bob&quot;;</pre><p>Git would keep track of all of those changes and have a way of indicating to the me that I changed that specific line in my code. You don’t want to save useless information on your Git history, so you tend to commit less often than you save. Dropbox doesn’t keep track of those specifics, and that is fine. We usually just need it to back us up.</p><p>Now there are a few problems with this scenario, remember how the .git folder could have thousands of files? If I make a change lots of those files are constantly being modified which trigger a synchronization by Dropbox.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4T-nBc9sbfzNaJnZKim-1A.png" /><figcaption>.git folder on Dropbox</figcaption></figure><p>Dropbox is usually going to update and index those .git files before it uploads your file and you will at times see the Dropbox icon spinning for a while before it makes it to the cloud.</p><p>There are situations where you would want to backup the .git folder, but in most cases that is not necessary because of services like <a href="https://github.com/">GitHub</a>, and <a href="https://about.gitlab.com/">GitLab</a> exist to store any .git history along with the code it is keeping track of.</p><p>So using all of your computers resources to index and upload thousands of files that don’t even need to be saved on to Dropbox does not make any sense. While my laptop is in the air looking like a seaplane those files are not going to get saved.</p><p>The .git folder is not even the real problem, the real problem has to do with files generated by package managers, or libraries utilized to make the code work. Developers constantly use resources and tools created by others to solve common problems. They often package these tools into libraries that we could just download into our project.</p><p>For example I commonly use this library created by Facebook called <a href="https://reactjs.org/">React</a>. The library would be downloaded with a package manager like <a href="https://www.npmjs.com/">NPM</a> or <a href="https://yarnpkg.com/en/">Yarn</a> and I would get the latest version of React into my project directory along with all of the tools and libraries that React relies on to work, because they too rely on other libraries for their library to work.</p><p>When you download a library like React.js using NPM or Yarn it creates a folder called <a href="https://docs.npmjs.com/files/folders">node_modules</a> and it saves everything Facebook used and needed to make React work. Now this folder is exponentially worse than the .git folder. It is common for the node_modules to have more than 20,000 files!</p><p>The screenshot below is an example of a small node_modules folder when you are working with a React project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/560/0*_ju02jfg_c_t7nT7" /></figure><p>This 20,000 file headache makes any computer kick up its fans and use all of its processing power to sync a node_modules folder and upload it to the cloud. It easily takes 2 hours for Dropbox to finish indexing and uploading this folder. 2 hours of Dropbox consuming your battery and CPU resources. This is not because the folder is massive, it is because of the amount of items in the folder.</p><p>When developers backup their code using sites like GitHub, BitBucket, and GitLab they usually update the .gitignore file to exclude the node_modules, because you don’t need to keep track of and upload other people’s code. Especially when you could easily download it again in another workstation if needed using the package manager.</p><p>The .gitignore file could also be set to ignore the node_modules recursively, or along with any file or folder you want to exclude like ones created by package managers such as, <a href="https://getcomposer.org/">Composer</a>, <a href="https://crates.io/">Cargo</a>, or <a href="https://packaging.python.org/tutorials/installing-packages/">PIP</a>.</p><p><strong>Wouldn’t it be nice if we could have ignored that folder using Dropbox?</strong></p><p>Well…we kind of have that with <a href="https://www.dropbox.com/help/syncing-uploads/selective-sync-overview">Selective Sync</a>, but that doesn’t quite solve the problem. This <a href="https://www.dropboxforum.com/t5/Manage-account/Ignore-folder-without-selective-sync/td-p/5926">4 year long thread </a>with 93,212 views 625 comments kind of expresses why. Dropbox also offers <a href="https://www.dropbox.com/smartsync?_tk=helpsync">Smart Sync</a>, which mimics the behavior that <a href="https://support.office.com/en-us/article/learn-about-onedrive-files-on-demand-0e6860d3-d9f3-4971-b321-7092438fb38e">OneDrive</a> has where the files are all on the cloud until you click on them, and decide to open / download a file, but that doesn’t stop the software from uploading those node_modules in the first place.</p><p>If you were brave enough to take a peak into that thread you could see that the solution for most people was to try another service, because why are they going to use something that causes this much issues to their workflow.</p><p>In the end just I settled with what I thought is the easiest solution.</p><p><strong>Just work outside of the Dropbox folder. </strong>Keep the code and all other files you are working in another directory, and figure out how to back it up later.</p><p>All my code is being saved to the Documents folder where I then send it to Dropbox on a schedule using either a shell script or software like <a href="https://freefilesync.org/">FreeFileSync </a>, or <a href="https://www.microsoft.com/en-us/download/details.aspx?id=15155">SyncToy</a>.</p><p>While I enjoyed the cleverness of writing my own script I also enjoy the utility of having a GUI interface guide me through the process. So I ended up using FreeFileSync as my go to solution. It is fast, it is useful, and it is easy to use. I use it on MacOS, Windows and Linux, and it is incredibly stable. I used to use it move and backup ~30GB .pst files at my old job and it handled it like a champ. It is faster than my shell scripts, and it has plenty of <a href="https://freefilesync.org/manual.php?topic=schedule-batch-jobs">documentation on how to put it on a schedule</a>.</p><p>FreeFileSync is able to exclude directories recursively and certain file types that you don’t want to be passed from computer to computer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/999/0*EGVHzRk8oMVK2CeC" /></figure><p>As part of my FreeFileSync experiment I have it grabbing files from three different computers, and synchronizing to Dropbox without all of the clutter of the node_modules. You could also choose if you want to make it a one direction, or a bi-directional synchronization. I am using the bi-directional sync and it checks Dropbox if there is any content or files that don’t exist in my Documents folder and syncs them over.</p><p>The biggest downside is that I don’t get the the satisfaction of a files instantly being pushed to Dropbox but it will do for now. I have tried a bunch of alternative solutions like using Shadow Copy, Time Machine or iCloud Backup but I didn’t find an easy solutions that worked on all operating systems like this one.</p><p>Do you know of a better way to do this, let me know?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c74ba9f2abce" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>