Last Updated: February 25, 2016
·
661
· paladin

Missing SVN Export?

Switched to git, but missing the way you could use svn export to deploy code directly from the repo? Try this:

git archive --format=tar --remote=uri://my/repo branch | tar -xmf - -C put/it/here

Git archive can spit out a tarball of your code, and if you pipe that output into tar you can extract it wherever you want to put it. Just put the URI for the repo as the "remote" argument, tell it what branch you want and then tell the receiving tar where you want to put it.

Will deploy locally, or over a network.