echo "更新代码"
git -c credential.helper= -c core.quotepath=false -c log.showSignature=false fetch origin dev:dev --recurse-submodules=no --progress --prune
echo "切换分支"
git -c credential.helper= -c core.quotepath=false -c log.showSignature=false checkout dev --
echo "合并代码"
git -c credential.helper= -c core.quotepath=false -c log.showSignature=false merge test
echo "推送代码"
git -c credential.helper= -c core.quotepath=false -c log.showSignature=false push --progress --porcelain origin refs/heads/dev:dev
echo "切回分支"
git -c credential.helper= -c core.quotepath=false -c log.showSignature=false checkout test --
新版250403
@echo off
echo 首先自己的代码要提交推送
echo 更新想要发布的代码分支
cd ../
git fetch origin devcre:devcre --progress --prune
echo 切换到想要发布的代码分支
git checkout devcre
echo 合并自己的代码
git merge devcre-kl --no-edit
echo 推送发布的代码分支
git push origin devcre
echo 切回自己的代码分支
git checkout devcre-kl
pause
注意换行格式为crlf 编码为gbk