I've been wondering whether there is a good "git export" solution that creates a copy of a tree without the
Probably the simplest way to achieve this is with
git archive. If you really need just the expanded tree you can do something like this.
git archive master | tar -x -C /somewhere/else
Most of the time that I need to 'export' something from git, I want a compressed archive in any case so I do something like this.
git archive master | bzip2 >source-tree.tar.bz2
git archive --format zip --output /full/path/to/zipfile.zip master
git help archive for more details, it's quite flexible.
Note: If you are interested in exporting the index, the command is
git checkout-index -a -f --prefix=/destination/path/
(See Greg's answer for more details)