用shell脚本来完成代码push(提交)
首先在需要提交代码的跟路径下新建文件 xx.sh
xx.sh 中输入
msg=$1
if [ -n "$msg" ]; then
gss
git add .
git commit -m "${msg}"
git pull
git push
echo "🙆♂️finish push"
else
echo "🙅♂️ please add commit"
fi
msg=$1
if [ -n "$msg" ]; then
gss
git add .
git commit -m "${msg}"
git pull
git push
echo "🙆♂️finish push"
else
echo "🙅♂️ please add commit"
fi