Git Archive Guide
Create clean source archives from your Git repository for distribution. Use git archive to export code at a specific revision without Git metadata, build artifacts, or excluded files.
Usage
Ask about creating archives from your repository, configuring export-ignore rules, or using archives for distribution.
Examples
- "How do I create a zip archive of the latest release tag?"
- "How do I exclude test files from git archive output?"
- "What is the difference between git archive and downloading a GitHub release?"
Guidelines
- Use .gitattributes with export-ignore to exclude files from archives
- Create archives from tags for reproducible release distribution
- Use tar format for Unix distribution and zip for cross-platform
- Verify archive contents before distributing to ensure nothing is missing
- Consider using CI/CD to automatically create archives for tagged releases