basepath=$(cd `dirname $0`; pwd) cd $basepath date > lastpushtime.log git add lastpushtime.log cd .. name=$( pwd|awk -F "/" '{print $NF}') git add ** git commit -am "update" git push origin master --force tag=$(date +1.%Y%m%d.%H%M%S) echo $tag git tag -a v$tag -m "update" cat >/tmp/${name}.pre </tmp/${name}.after <