Archive a folder without redundant files using the command line on macOS.
cd <folder_path>where <folder_path> — a folder which should be archived.
zip -r <archive_name>.zip . -x "*.git*" -x "*.DS_Store"or
zip -r <archive_name>.zip <folder_path>/* -x "*.git*" -x "*.DS_Store"Check the archive content (files, folders inside)
unzip -l <archive_name>.zipReference: https://vyspiansky.github.io/2017/04/07/zip-archive-without-ds-store-macos/