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
转载请注明出处
《git比较与上一版本不同并打包到zip生成补丁包》https://www.ywlib.com/archives/117.html (from 一闻自习室)