侧边栏壁纸
博主头像
SHO酱的Blog博主等级

行动起来,活在当下

  • 累计撰写 116 篇文章
  • 累计创建 149 个标签
  • 累计收到 3 条评论

目 录CONTENT

文章目录

Git导出当前版本的干净代码

SHO酱
2018-01-28 / 0 评论 / 0 点赞 / 515 阅读 / 1219 字

git archive查看帮助:

usage: git archive [<options>] <tree-ish> [<path>...]
   or: git archive --list
   or: git archive --remote <repo> [--exec <cmd>] [<options>] <tree-ish> [<path>...]
   or: git archive --remote <repo> [--exec <cmd>] --list

    --format <fmt>        archive format
    --prefix <prefix>     prepend prefix to each pathname in the archive
    -o, --output <file>   write the archive to this file
    --worktree-attributes
                          read .gitattributes in working directory
    -v, --verbose         report archived files on stderr
    -0                    store only
    -1                    compress faster
    -9                    compress better

    -l, --list            list supported archive formats

    --remote <repo>       retrieve the archive from remote repository <repo>
    --exec <command>      path to the remote git-upload-archive command

导出最新的版本库

git archive --format zip --output "./output.zip" HEAD
git archive --format zip -o ./output.zip HEAD
0

评论区