0

怎样使用 git-archive 压缩打包某个版本所有文件为 zip

eleanore created at6 years ago view count: 2571

要把现在的分支打包给包发给别人, 就想github或者bitbucket里面的下载功能一样。看了命令好像有个git archive ,不知道怎么用的。

report
回复
0

用这个就行了 git archive -9 -o latest.zip HEAD -9 表示按最小比例压缩文件, 耗时比较多。可以选择1-9的数字

6 years ago 回复
0

可以直接看下官方文档: https://git-scm.com/docs/git-archive

# 打包 某个分支
git archive --prefix=git-1.4.0/ -o git-1.4.0.tar.gz v1.4.0 
6 years ago 回复