I've had the same problem, as sunew already mentioned you can now mark files or folders to be ignored. I use the following bash script in my Dropbox folder on MacOS to find all .git
folders and parent node_modules
folders in the Dropbox folder and mark these to be ignored:
# for MacOS
# exclude-files-dropbox.sh
find . -type d -name "node_modules" -prune -exec xattr -w com.dropbox.ignored 1 {} \;
find . -type d -name ".git" -prune -exec xattr -w com.dropbox.ignored 1 {} \;
The following should work on Linux:
# for Linux
# exclude-files-dropbox.sh
find . -type d -name "node_modules" -prune -exec attr -s com.dropbox.ignored -V 1 {} \;
find . -type d -name ".git" -prune -exec attr -s com.dropbox.ignored -V 1 {} \;