用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
chmod 755 xx.sh 提升脚本权限 /xx.sh 执行
在ignore 中忽略掉该文件
posted @ 2021-04-27 11:44  Heson  阅读(441)  评论(0编辑  收藏  举报
Live2D