码迷,mamicode.com
首页 > 其他好文 > 详细

Do a “git export” (like “svn export”)?(转)

时间:2015-10-21 00:00:31      阅读:416      评论:0      收藏:0      [点我收藏+]

标签:

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

ZIP archive:

git archive --format zip --output /full/path/to/zipfile.zip master 

git help archive for more details, it‘s quite flexible.
http://stackoverflow.com/questions/160608/do-a-git-export-like-svn-export

Do a “git export” (like “svn export”)?(转)

标签:

原文地址:http://www.cnblogs.com/softidea/p/4896339.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!