gitPull.sh 198 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 USER=$(whoami) if [[ "$USER" != "root" ]];then echo "ERROR:需切换到root用户!" exit 1 fi if [[ $1 ]];then cd $1 git reset --hard origin/master git pull; else echo "未输入路径" fi