使用 git archive 可以导出干净的代码,具体可以看 git help archive,简单使用如下 git archive --format zip --output "./output.zip" master -0