Skip to content

Instantly share code, notes, and snippets.

View memandip's full-sized avatar
🎯
Focusing

Mandip Tharu memandip

🎯
Focusing
  • Kathmandu, Nepal
View GitHub Profile

Zip excluding specific directories

Exclude .git file and node_modules directory

$ zip -r9 [target_file] [source_file] -x *.git* node_modules/\*

Exclude .git file and files in node_modules directory, but keep node_modules directory

$ zip -r9 [target_file] [source_file] -x *.git* node_modules/**\*