You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Tom_M
11 years agoHelpful | Level 6
Status:
Investigating
Add .dropboxignore directory to exclude folders without using selective sync
Please please please can you add a feature that allows folders to be excluded from the Dropbox account (on windows and mac). For sure I'm not the first person to request this, but I'm yet to find a g...
Antoni A.
New member | Level 2
It will be so useful if I could exclude certain files from syncing based on a file mask. Examples:
.tmp
*.xml~
mailbox.psd
aa.t??
Sherwino
7 years agoHelpful | Level 5
Nobody could deny the utility of Dropbox, it is an incredibly useful tool.
The ability to be able to work on one computer and just pick up where you left off on another is great.
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.
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. One of the most common tools is Git.
Git creates a hidden folder called .git that contains a variety of information needed to help Git catalog and keep track of all your files. If you want to learn more about it you could read this article by a developer trying to make sense of its structure, or you could go directly to Git's website.
I mention Git for two reasons:
- The .git folder could have thousands of files, for a small project.
- Git has a special file called .gitignore that could tell the Git program ignore folders or files, recursively.
I commonly use my Dropbox folder, as my active working directory because it is convenient that as soon as I press save it uploads it to the cloud. So if I randomly drop my laptop into a large body of water I would be able to pull out my phone and continue working there as if nothing happened. Then, after completing a certain task I use Git to commit all of the changes I did to my code. Git keeps track of the specific changes I did so if I changed the name of a variable from,
const customersFirstName = "Bob";
to
const name = "Bob";
Git would keep track of all of those changes and let me know that I changed that specific line in my code. Dropbox doesn't keep track of those specifics, and that is fine. I just need it to back me up.
Now there are a few problems with this scenario, remember .git could have thousands of files? If I make a change lots of those files are constantly being modified which trigger a synchronization by Dropbox. Dropbox is usually going to update and index those .git files before it uploads your file and you will sometimes see the Dropbox icon spinning for a while before it makes it to the cloud.
There are situations where I would want to backup the .git folder, but in most cases that is not necessary because I use services like GitHub, and GitLab to store my .git history along with the code it is keeping track of.
So here I am using all of my computers resources to index and upload thousands of files that I don't even need to save on to Dropbox while my laptop is flying in the air getting ready to visit the fishes.
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. For example I commonly use this library created by Facebook called React. So I use a package manager like NPM or Yarn to download 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.
When you download a library like React.js using NPM or Yarn creates a folder called node_modules and it saves everything Facebook used and needs 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! The screenshot below is pretty much the smallest node_modules folder you could have using a React project.
This 20,000 file headache makes my 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. As you could see in the screenshot above it is not because the folder is massive, it is because of the amount of items in the folder.
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.
The .gitignore file could also be set to ignore the node_modules recursively, or any file/folder including ones created by package managers such as, Composer, Cargo, or PIP.
Wouldn't it be nice if we could have ignored that folder using Dropbox?
Well we kind of have that with Selective Sync, but that doesn't quite solve the problem.
This 4 year long thread with 93,212 Views 625 Comments kind of expresses why. Dropbox also offers Smart Sync, which mimicks the behavior that OneDrive has where the files are all on the cloud until you click on them, and decide to open / download a file.
If you were brave enough to take a peak into that thread you saw 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. While I agree, I don't feel like moving around GBs of information just because one thing didn't pan out.
In the end just I settled with what I thought is the easiest solution.
In the end just I settled with what I thought is the easiest solution.
Just work outside of the Dropbox folder.
Keep the code and all other files you are working in another directory, and figure out how to back it up later.
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 FreeFileSync , or SyncToy.
While I enjoyed the cleverness of writing my own script I enjoy the utility of having a GUI interface guide me through the process. So I ended up using FreeFileSync the most, its fast, it is useful, and it is easy to use. I use it on MacOS, Windows and Linux, and it is incredibly stable. It is faster than my shell scripts, and it has plenty of documentation on how to put it on a schedule.
FreeFileSync is grabing files from three different computers, and synchronizing with Dropbox without all of the clutter. At the same time it would check Dropbox if there is any content or files that it does not have and it will send them to my Documents folder.
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.
Do you know of a better way to do this, let me know?
Do you know of a better way to do this, let me know?
- Lusil7 years agoDropbox StaffHi there Sherwino!Thanks for the detailed post, awesome work! I’ve gone ahead and moved it to the developer section of the Forum; perhaps some like-minded community members will have some more ideas to share on this with you.Cheers! :nerd:
- dylan-chong7 years agoHelpful | Level 5
Lusil Where can i find this post that you moved to? I am also very interested in ignoring the node modules folders
- atccodex7 years agoSuper User alumni
Hey Sherwino
I have the same problem. I do the same thing as you, and I agree it is a pain. Especially with a hard day coding, that little Dropbox icon is working overtime. BUT, you can tell Dropbox to ignore the .git folder.
http://www.dropboxwiki.com/tips-and-tricks/exclude-folders-from-syncing
Yes it is a workaround, BUT it will work. Usually though, when I am coding, I will pause the sync completely while I am actively working. Then when I am done for a while, I'll resume the sync and just let it work for a while (usually just let it do it's thing overnight). No it isn't perfect, no I don't need those useless files on Dropbox. Yes, it would be AWESOME if this could get implemented for a new feature like .dropboxignore.
- djm27 years agoHelpful | Level 6
I would also like this feature. Not being able to exclude node_modules ruins Dropbox for me (I know this can be done manually at the start of each project but that is not a reasonable solution). I use git and bitbucket but would like to have a copy of my entire development directory on Dropbox with the node_modules files excluded. The node_modules directory can have hundreds of thousands of files and sym links. I have to throttle the Dropbox process in order for my computer to not overheat while using Dropbox, even when I'm not even updating any files! I'll have to stop syncing my node projects and look for an alternate provider with this feature.
- gnou7 years agoExplorer | Level 3
It has been a very popular request from developers which has been ignored for years by Dropbox. Implementing a .gitignore like logic would simply make dropbox usable by developers.
Actually, it is not.
- Danziger7 years agoExplorer | Level 4
Totally agree with this request!
I can't believe Dropbox has been ignoring this for so long when the selective sync feature is already there... We just need a different way to tell it what to ignore, something similar to .gitignore or, even better, just be able to tell it to use the existing .gitignore files!
In my opinion, part of the problem is that no other storage providers like Google Drive or Microsoft OneDrive are doing that either, at least not that I know. Otherwise, we might see some progress as Dropbox would probably want to catch up with what others are offering to avoid losing users...
Related Content
- 6 months ago
- 11 months ago
- 2 years ago