push.sh
set -e
WORKDIR=$(cd `dirname $0`;pwd)
cd ${WORKDIR}
git pull
TIME=$(date "+%Y%m%d%H%M")
git add --all
git commit -m "${TIME}"
git push
把push.sh放到git工程的主目录下面,当有变更时,执行bash push.sh即可
微信扫一扫
#!/bin/bash
set -e
WORKDIR=$(cd `dirname $0`;pwd)
cd ${WORKDIR}
git pull
TIME=$(date "+%Y%m%d%H%M")
git add --all
git commit -m "${TIME}"
git push
把push.sh放到git工程的主目录下面,当有变更时,执行bash push.sh即可
相关推荐