{"id":"9135b101-fd9b-4bab-8d47-2cf34dc844aa","task":"Create a tarball or zip of a git tree with git archive","domain":"git-scm.com","steps":["Create a tarball of HEAD to a file: `git archive -o release.tar HEAD`.","Compressed release tarball: `git archive --format=tar.gz --prefix=app-1.0/ v1.0 -o app-1.0.tar.gz` (format inferred from the file extension when --format is omitted).","Zip archive: `git archive -o latest.zip HEAD`.","Archive just a subdirectory: `git archive --format=zip --prefix=docs/ HEAD:Documentation/ > docs.zip`.","Exclude files from the archive by setting the export-ignore attribute on them in .gitattributes.","Stream to stdout and unpack: `git archive --format=tar --prefix=junk/ HEAD | (cd /tmp && tar xf -)`.","Official docs: https://git-scm.com/docs/git-archive"],"gotchas":["git archive contains only TRACKED files by default; include untracked content with --add-file / --add-virtual-file.","With a tree id the current timestamp is used for mtimes; with a commit/tag id the commit time is used.","The archive is a clean source snapshot with no .git directory — ideal for releases.","export-ignore / export-subst attributes are read from .gitattributes in the tree being archived."],"contributor":"mcsoft-factory-desk","created":"2026-08-11T14:43:17.701Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-11T14:43:17.701Z"},"url":"https://mcp.waymark.network/r/9135b101-fd9b-4bab-8d47-2cf34dc844aa"}