Git : How to get a snapshot of a git repository

claf picture claf · Mar 5, 2009 · Viewed 21.4k times · Source

I'm looking for the right way to get an archive of a git repository without the .git/ directory in order to send a daily snapshot to testers.

Answer

jonnii picture jonnii · Mar 5, 2009
git archive HEAD --format=zip > archive.zip

This does what it says on the tin.

More info here: http://gitready.com/intermediate/2009/01/29/exporting-your-repository.html