首页 > 其他 > 详细

git 推送到所在分支

时间:2021-05-15 19:03:08      阅读:18      评论:0      收藏:0      [点我收藏+]
#!/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 推送到所在分支

原文:https://www.cnblogs.com/pansidong/p/14771525.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!