diff --git a/run.sh b/run.sh index 725d96b..99b770a 100755 --- a/run.sh +++ b/run.sh @@ -29,14 +29,14 @@ do continue fi - latest_commit=`git log "--format=%G? %H" | grep ^G | head -n 1 | cut -d' ' -f2` + latest_commit=`git log "--format=%G? %H" origin/master | grep ^G | head -n 1 | cut -d' ' -f2` if test -z $latest_commit; then sleep $delay continue fi git reset --hard >> $log 2>&1 - git checkout $latest_commit >> $log 2>&1 + git checkout $latest_commit -f >> $log 2>&1 if [ $? -ne 0 ]; then echo "Git checkout failed. For more details, see $log" sleep $delay