git写个脚本提交

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了git写个脚本提交相关的知识,希望对你有一定的参考价值。

因为是ios项目,就我自己一个人写的。git初级使用阶段,感觉敲指令太麻烦,所以尝试写个sh脚本。

 

内容如下:

#!/bin/sh

cd /Users/username/Desktop/workspace/verycloud/ios/proj
ls
git branch
git add -A
echo "输入您的commit文字"
read $a
git commit -m "shell提交:$a"

echo "需要push到:b-someone-edit分支则输入y"

read choose

if [ $choose = "y" ];then
echo "正在执行命令:git push origin b-someone-edit "
git push origin b-someone-edit
else
echo "您没有push到服务器"
fi

 

这货是懒人,这货是懒人,这货是懒人……

 

以上是关于git写个脚本提交的主要内容,如果未能解决你的问题,请参考以下文章