#!/bin/bashgit add --allecho -e "\033[33m 请输入提交描述文字如果没有默认: 提交代码 \033[0m"read describeif [ ! -n "$describe" ]thendescribe="提交代码"fiecho $describegit commit -m $describeecho -e "\033[33m 请输入要拉取的分支名称: 提交代码 \033[0m"echo -e "\033[33m 0 -> master \033[0m"echo -e "\033[33m 1 -> develop \033[0m"echo -e "\033[33m 如果是其他分支请直接输入分支名称: 提交代码 \033[0m"istrue=1while [ $istrue == 1 ]doread barchtempbarch=""if [ $barch == 0 ]thenecho -e "\033[33m 输入的是master: 提交代码 \033[0m"  tempbarch="master"elif [ $barch == 1 ]thenecho -e "\033[33m 输入的是develop: 提交代码 \033[0m"tempbarch="develop"elseecho -e "\033[33m 输入的是develop: 输入的是其他分支 \033[0m"tempbarch=$barchfiecho $tempbarchgit pull origin $tempbarchif [ $? == 0 ]thenistrue=0echo $istrueelseecho -e "\033[33m 输入的是develop: 提交代码 \033[0m" "请输入正确的分支名称"fidoneecho -e "\033[33m 请输入要上传的分支名称 \033[0m"  echo -e "\033[33m 0 -> master \033[0m" echo -e "\033[33m 1 -> develop\033[0m" echo -e "\033[33m 如果是其他分支请直接输入分支名称 \033[0m" istruetwo=1while [ $istruetwo == 1 ]doread barchapushbarch=""if [ $barcha == 0 ]thenecho -e "\033[33m 输入的是master \033[0m"pushbarch="master"elif [ $barcha == 1 ]thenecho -e "\033[33m 输入的是develop \033[0m"pushbarch="develop"elseecho -e "\033[33m 输入的是其他分支 \033[0m"pushbarch=$barchafiecho $pushbarchgit push origin $pushbarchif [ $? == 0 ]thenistruetwo=0echo $istruetwoelseecho -e "\033[33m 请输入正确的分支名称 \033[0m"fidoneread -p "任意键继续..."echo "---END---"