I want to zip all contents of the present directory into a zip file. While doing this I want to exclude both the .git directory and the node_modules directory.
These commands will exclude .git dir's, but fail to exclude node_modules:
zip -r output.zip . -x '*.git*' -x 'node_modules'
zip -r output.zip . -x '*.git*' 'node_modules'
Please adjust your command to:
zip -r output.zip . -x '*.git*' -x '*node_modules*'