#!/bin/bash # 测试环境 ssh root@124.222.192.138 # cd /data/project/my_loan/ # git pull # panyong/panyong123456 # cd htmldev/shiningManage # cd htmldev/loan # cd htmldev/shiningH5 # npm run build # 生产环境 ssh root@81.68.73.90 # cd /data/project/qianduan/my_loan # npm run build:pro #function git.branch { # br=`git branch | grep '*'` # echo ${br/* /} #} # git pull # git status # read -p "Enter your commit_message,please: " commit_message # git add . # git commit -m ${commit_message} # git push origin ${git.branch} # echo '代码提交成功' # 移除源 # git remote remove origin # 添加新源 # git remote add origin http://124.222.192.138:3000/front_end/swago.git # git pull # git branch --set-upstream-to=origin/master master # git pull origin master # 如果报histories什么的错误,就执行下面的 # git pull origin master --allow-unrelated-histories