git_push.sh 550 B

12345678910111213141516
  1. #!/bin/bash
  2. source /etc/zprofile
  3. export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
  4. #cd "~/Desktop/git原型导出文档"
  5. #/usr/bin/pwd
  6. git config --global user.email "827655250@qq.com"
  7. git config --global user.name "huangliyin"
  8. git add .
  9. git commit -m "更新原型"
  10. git remote add origin1 http://git.fj-yuchen.com:3000/huangliyin/yuanxing.git
  11. git push origin1 master
  12. if [ $? -eq 0 ] ;then
  13. echo -e "\033[32m更改推送到远程仓库成功。\033[0m"
  14. else
  15. echo -e "\033[31m更改推送到远程仓库失败。\033[0m"
  16. fi