basepath=$(cd `dirname $0`; pwd)
cd $basepath
git pull && git status|grep 'Changes' && git add . && echo -n "请输入提交说明(或回车使用默认):" && read commit_message && commit_message=${commit_message:-commit something} && git commit -m "$commit_message" && git push
echo
echo 更新完成:$basepath
echo 按任意键继续...
read -n 1
git 自动更新,如果有提交,则输入提交说明文本提交,或直接回车使用默认说明提交。