#!/bin/bash
# 一次性处理git提交
#branch_name=`git symbolic-ref --short -q HEAD`
branch_name=$(git symbolic-ref --short -q HEAD)
if [ ! -n "$1" ] ;then
commit="提交"
else
commit=$1
fi
password="123456"
echo $password|sudo -S git add .
echo $password|sudo -S git commit -m "$commit"
echo $password|sudo -S git push origin "$branch_name"
git 推送到所在分支
转载
相信坚持的力量,日复一日的习惯.
本文章为转载内容,我们尊重原作者对文章享有的著作权。如有内容错误或侵权问题,欢迎原作者联系我们进行内容更正或删除文章。
上一篇:6-20 位密码交验正则
下一篇:后台指定ip才可以访问
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
git 本地代码推送到远程分支
在命令行上创建新的存储库git initgit add README
git github 命令行
















