git.sh 280 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 #!/bin/bash basepath=$(cd `dirname $0`; pwd) if [[ $1 ]];then if [[ "$1" == "pull" ]];then cd $basepath git reset --hard origin/master git pull fi if [[ "$1" == "push" ]];then cd $basepath git add . git commit -m "add by shell" git push fi fi