1 Star 0 Fork 55

信一/thingsvue

forked from 拓深科技/thingsvue 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
git.sh 1.65 KB
一键复制 编辑 原始数据 按行查看 历史
xukangKen 提交于 2024-05-10 09:45 . ADD | #新增readme
#!/bin/bash
# 函数
function echoMsg(){
echo -e ${1}
}
git add .
#是否是主分支
read -p "是否是主分支[y/n]" branch
if [ "$branch" == "y" ]
then
# 选择提交类型
read -p "提交类型 [a/u/f/s]:" comfirm
#新增
if [ "$comfirm" == "a" ]
then
read -p "输入commit信息:" gitCommit
git commit -m "ADD | #$gitCommit"
#更新
elif [ "$comfirm" == "u" ]
then
read -p "输入commit信息:" gitCommit
git commit -m "UPDATE | #$gitCommit"
#修复
elif [ "$comfirm" == "f" ]
then
read -p "输入commit信息:" gitCommit
git commit -m "FIX | #$gitCommit"
else [ "$comfirm" == "s" ]
read -p "输入commit信息:" gitCommit
git commit -m "SELF | #$gitCommit"
fi
echoMsg "\n\n*************** 正在提交代码... ***************\n\n"
git push origin master
else
read -p "请输入分支名称:" branchName
# 选择提交类型
read -p "提交类型 [a/u/f/s]:" comfirm
#新增
if [ "$comfirm" == "a" ]
then
read -p "输入commit信息:" gitCommit
git commit -m "ADD | #$gitCommit"
#更新
elif [ "$comfirm" == "u" ]
then
read -p "输入commit信息:" gitCommit
git commit -m "UPDATE | #$gitCommit"
#修复
elif [ "$comfirm" == "f" ]
then
read -p "输入commit信息:" gitCommit
git commit -m "FIX | #$gitCommit"
else [ "$comfirm" == "s" ]
read -p "输入commit信息:" gitCommit
git commit -m "SELF | #$gitCommit"
fi
echoMsg "\n\n*************** 正在提交代码... ***************\n\n"
git push origin $branchName
fi
read -p "脚本运行结束"
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/xinyi0106/thingsvue.git
git@gitee.com:xinyi0106/thingsvue.git
xinyi0106
thingsvue
thingsvue
master

搜索帮助