#########################################################################
# File Name: push.sh
# Author: tuzhuo
# mail: xmb028@163.com
# Created Time: 2019年09月11日 星期三 19时56分03秒
#########################################################################
#!/bin/bash

if [ $# -eq 0 ]
then
    pushmessage=`date +%Y-%m-%d`
else
    pushmessage="$*"
fi

#pushmessage=`date +%Y-%m-%d`

echo ${pushmessage}

git add -A
git commit -m "${pushmessage}"
git push origin master

 

脚本使用说明:

通常的用法是直接命令回车(脚本环境兼容windows和linux的git):

bash push.sh

该脚本默认的push信息是提交当天的年月日,eg:2019-10-1;

若要自定义git的push信息,只需要:

bash push [message]

eg:

bash push.sh Bob-first-push

bash push.sh Bob first push

再回车即可。

 

tz@croplab,hzau

2019-11-3

相关文章:

  • 2022-12-23
  • 2021-08-05
  • 2022-12-23
  • 2022-12-23
  • 2021-10-24
  • 2021-07-07
  • 2021-12-26
  • 2021-11-12
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-07-16
  • 2021-05-25
  • 2022-12-23
  • 2021-04-24
  • 2022-12-23
相关资源
相似解决方案