Skip to main content

Git Archive Deep

Project description

Deep archive command for git

PyPI Status Python Version License

Read the documentation at Tests Codecov

pre-commit Black


  • Archive a git repository with all sub-modules.


You can install Git Archive Deep via pip from PyPI:

$ pip install git-archive-deep


Let's say you have a repository in a directory MyTool/ and you want to archive version 2.1, which is tagged v2.1.

git archive-deep v2.1 ./MyTool

This will create a zip file named that contains the repository along with its sub-modules.

This tool is similar to git-archive-all, but it allows you to specify a git ref instead of archiving the currently checked out commit. It is really just simple wrapper around Git that calls git archive <ref> . in the repository directory, but then reads .gitmodules (if it exists), determines the SHA1 for each sub-module using git rev-parse (calling git rev-parse v2.1:path/to/submodule will print the SHA1 for the commit that is checked out in submodule located at path/to/submodule for version v2.1), and then just calls itself for each sub-module recursively, merging each archive into the main repo.


Contributions are very welcome. To learn more, see the Contributor Guide.


Distributed under the terms of the MIT license, Git Archive Deep is free and open source software.


If you encounter any problems, please file an issue along with a detailed description.


This project was generated from @cjolowicz's Hypermodern Python Cookiecutter template.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

git-archive-deep-0.1.2.tar.gz (5.3 kB view hashes)

Uploaded Source

Built Distribution

git_archive_deep-0.1.2-py3-none-any.whl (5.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page