The blog about containerisation, virtual machines and useful shell snippets and findings

How to export git repository to one package?

There is nice git option called “git archive”. It exports your repo as one file, which is excellent, for instance, when you should send your repo in email with one small attachment.

Oneliner:

git archive --format=tar.gz --prefix=myproject/ HEAD >myproject.tar.gz