Skip to content

Instantly share code, notes, and snippets.

@Leftium
Created February 22, 2022 01:37
Show Gist options
  • Save Leftium/290422ceff5c4af165198a2005ee33df to your computer and use it in GitHub Desktop.
Save Leftium/290422ceff5c4af165198a2005ee33df to your computer and use it in GitHub Desktop.
Recursively ignore node_modules in Dropbox. Git for Windows edition.
#!/bin/sh
# vim: wrap!
# Recursively ignore node_modules in Dropbox. Git for Windows edition.
# Based on: https://stackoverflow.com/a/69655523/117030
find "$1" -type d | grep 'node_modules$' | grep -v '/node_modules/' | xargs -I {} -t powershell -command "Set-Content -Path '{}' -Stream com.dropbox.ignored -Value 1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment