git archive


To quickly get a source distribution in zip format

git archive --format=zip -o source.zip HEAD source/ README

Assuming, source code is under the folder source. README is a file in the same folder as source. Subfolders ignored by .gitignore are not archived. You can replace HEAD with a commit label. zip can be replaced with tar or tar.gz. See man git-archive for more details.

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