Everything about git is amazing. And by “everything”, I mean almost everything. As someone that used Perforce and SVN before learning git, I’m willing to ignore a few git annoyances since it makes branching and many other simple tasks easier.
One good problem I have with git is that it’s so powerful I don’t know all of its features.
One feature I recently found out about is its archive feature which allows for exporting an entire repository to a zip or tar file.
# Format: git archive {branchname} --format={compression} --output={filename} git archive master --format=tar --output=kuma.tar git archive some-feature-branch --format=tar --output=kuma.tar
Sure you could use any archiving utility to archive a given repo, this feature allows for quick archiving of any branch or repository state!
Source: David Walsh