How to exclude .DS_Store from a zip file

This can be easily achieved using your terminal

zip -r foo -x "*.DS_Store"


a. -r for recursively including all directories underneath the targets we want to zip.
b. is the name of the zip archive we are creating
c. foo is the target directory we want to zip up
d. -x “*.DS_Store” excludes all files whose path ends in the string “.DS_Store”