Once in awhile (like today!) I have to zip up a git project to send to someone.
When this happens, obviously don't want to include the .git files, I just want the contents of the repo.
To do this, I use this command:
zip -r my-zippedup-stuff.zip ./directory-of-my-project/ -x '*.git*'
To break this down:
- zip - the command I'm running
- -r - do this recursively
- my-zippedup-stuff.zip - the name of the zip file I want to create
- ./directory-of-my-project/ - the name of a directory BELOW my current location
- -x '*.git*' - ignore all files ending with anything starting with .git