git 增量打包

执行命令如下

git diff 7b05d8114ae233a3fb4366ba52fde4bc34698eae 7cccc8a294812728e9fc3b2ae9dba58ca5464286 --name-only | xargs zip update.zip
git archive -o /update.zip HEAD $(git diff 7b05d8114ae233a3fb4366ba52fde4bc34698eae 7cccc8a294812728e9fc3b2ae9dba58ca5464286 --name-only)

 

结果如下

 

image

 

image

 

Windows下请在 cygwin 或者 git bash here ,安装 zip 命令或者使用 tar

 

git diff 7b05d8114ae233a3fb4366ba52fde4bc34698eae 7cccc8a294812728e9fc3b2ae9dba58ca5464286 --name-only | xargs tar -czvf update1.tar.gz
git archive -o update.tar.gz HEAD $(git diff 7b05d8114ae233a3fb4366ba52fde4bc34698eae 7cccc8a294812728e9fc3b2ae9dba58ca5464286 --name-only)