Recently I had to export the latest version of a project from a bare Git repository. As it seems like there is no equivalent to svn export in Git, I had to look for an alternative. After some searching I found the following solution:
$ cd ~/example.git
$ git archive master | tar -x -C /path/to/target/folder
The first part of this statement creates a tar archive with the content of the master branch. The second part then extracts this archive to the specified folder (-x means “extract”, and -C means “change to directory”).
I hope this is useful for some of you!

Seems like a waste of cpu cycles to me.
Why not just clone, and if you really don’t want the ‘.git’ directory, just remove it?
or if you already have it checked out, cp && rm -rf .git
keep it simple ;)
Dieter
Re: “I hope this is useful for some of you!”
Actually, this was indeed useful for me, insofar as I had completely forgotten about the existence of the ‘git archive’ command. i agree with Dieter about just cloning and removing the .git folder to keep things simple and fast, but I gotta admit that ‘git archive’ is a useful tool and I appreciate being reminded about it. ;)
@Dieter, Silver Knight: Thanks for your comments!
@Dieter: I don’t think I have to care much about cpu cycles, my repos are not that big ;-) But you are right, using ‘clone’ and then removing the ‘.git’ directory is a good alternative.