在项目外面写入push.sh
内容为
if [ $1!='' ]
then
msg=$1;
else
msg='bug';
fi
git add .
git commit -m $msg
git pull origin dev
git push origin dev
git checkout test
git pull origin test
git merge dev
git push origin test
git checkout prod
git pull origin prod
git merge test
git push origin prod
git checkout dev
执行脚本../push.sh 'commit输入的内容'
即可. 具体分支名字由自己决定