Skip to content

Instantly share code, notes, and snippets.

@JohnZavyn
Created November 15, 2024 09:48
Show Gist options
  • Save JohnZavyn/4ef3d7a29d07f1cda2883a1f482d67d5 to your computer and use it in GitHub Desktop.
Save JohnZavyn/4ef3d7a29d07f1cda2883a1f482d67d5 to your computer and use it in GitHub Desktop.
An example configuration that will allow you to use git to create a zip file with the current project while ignoring specific files and folders.
# For use with git archive command:
# git archive --worktree-attributes --format=zip --output="$(basename "$PWD").zip" HEAD
* text=auto eol=lf
*.php diff=php
.editorconfig export-ignore
.gitattributes export-ignore
.gitignore export-ignore
/.git export-ignore
/.idea export-ignore
/tests export-ignore
/util export-ignore
/vendor export-ignore
phpunit.xml export-ignore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment