Sarav's Weblog

Technical Articles for RoR Developers

Do a “git export” like “svn export”


git export
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 /your/path/to/export

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 help archive for more details, it’s quite flexible.

Advertisements

One response to “Do a “git export” like “svn export”

  1. Steven Blond July 30, 2010 at 9:50 pm

    Thank’s. The Safety is No-1. I’m from Hungary, And I’m thing so.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: