Skip to content

Instantly share code, notes, and snippets.

@anuraghazra
Last active February 16, 2025 21:44
Show Gist options
  • Save anuraghazra/95a4150789f6166f75ff566b494c72d9 to your computer and use it in GitHub Desktop.
Save anuraghazra/95a4150789f6166f75ff566b494c72d9 to your computer and use it in GitHub Desktop.
Exclude node_modules folder when copying directory.

Handy Trick To Get Rid Of node_modules

This one is a simple and handy trick when you want to copy your directories without node_modules folder.

Enter this command in your terminal.

robocopy SOURCE DEST /mir /xd node_modules
@TibixDev
Copy link

Hi!

For OSX (and i guess other unix)

rsync -av -progress --exclude="node_modules" sourceToCopy destination

This helped me massively, thank you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment