一开始尝试使用 zip -r 打包,发现会丢失一些文件
接着使用 git archive --format zip --output /full/path/to/zipfile.zip master 打包 git repo,发现这种方法不会把.git打包进去
然后自己找到了一个可以用的方法

1. 使用 tar -czf 打包git仓库
git clone /opt/helloworld/ folder2 tar -czf helloworld-latest.zip folder2
2. 使用 tar xvf 解包 (如果使用 unzip 解包会报错)



Logo

瓜分20万奖金 获得内推名额 丰厚实物奖励 易参与易上手

更多推荐