Create an archive from a tree-ish.
Section: Repository Creation and Discovery
Create tar archive from HEAD
bash
bash
git archive --format=tar HEAD > repo.tarLearn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Repository Creation and Discovery
Create zip archive with prefix
Bundle repository files without the .git directory.
Initialize bare repository
Create a repository without a working tree for server or shared use.