Create a Repository Archive with git
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!
![Serving Fonts from CDN]()
For maximum performance, we all know we must put our assets on CDN (another domain). Along with those assets are custom web fonts. Unfortunately custom web fonts via CDN (or any cross-domain font request) don't work in Firefox or Internet Explorer (correctly so, by spec) though...
![Regular Expressions for the Rest of Us]()
Sooner or later you'll run across a regular expression. With their cryptic syntax, confusing documentation and massive learning curve, most developers settle for copying and pasting them from StackOverflow and hoping they work. But what if you could decode regular expressions and harness their power? In...
![Create Tiny URLs with TinyURL, MooTools, and PHP]()
Since we've already figured out how to create TinyURL URLs remotely using PHP, we may as well create a small AJAX-enabled tiny URL creator. Using MooTools to do so is almost too easy.
The XHTML (Form)
We need an input box where the user will enter...
![Display Images as Grayscale with CSS Filters]()
CSS filters aren't yet widely supported but they are indeed impressive and a modern need for web imagery. CSS filters allow you to modify the display of images in a variety of ways, one of those ways being displaying images as grayscale.
Doing so requires the...
The title is misleading, git archive only puts the tree of a single commit into the .tar file, not the entire branch’s history. Useful for creating a tar file to release a version.
git bundle is what should be under this heading.
Hey, wouldn’t that make another nice entry?
Just a small correction:
--format
does not mean compression. It is – well – just the format of the archive, but it is not compressed at all.