git比较与上一版本不同并打包到zip生成补丁包

运维10 次浏览

git比较本次提交与上一版本不同并打包到zip生成补丁包。生成zip可作为补丁包,解压直接上传到服务器端。

git diff HEAD HEAD~1 --name-only | xargs zip update.zip

存为脚本放到~/bin目录下,如makefix.sh。此后直接调用美滋滋。

rm -f update.zip
git diff HEAD HEAD~1 --name-only | xargs zip update.zip

相关文章

评论

暂无评论

发表评论

提交后需审核,请勿重复提交。