From 17c6d4c1b3a0a5cb493ed2477cae22afb189313d Mon Sep 17 00:00:00 2001 From: yangyu Date: Mon, 23 Jul 2018 00:00:59 +0800 Subject: [PATCH] =?UTF-8?q?git=20pull=20=E5=86=B2=E7=AA=81=E8=A7=A3?= =?UTF-8?q?=E5=86=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hexo/start.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hexo/start.sh b/hexo/start.sh index bde8e91..9c52185 100644 --- a/hexo/start.sh +++ b/hexo/start.sh @@ -15,6 +15,9 @@ hexo server --cwd /hexo -p 80 > /logs/hexo.log 2>&1 & while true; do - cd /hexo; git pull > /dev/null 2>&1 ; + cd /hexo; + git fetch --all; + git reset --hard origin/$BRANCH; + git pull > /dev/null 2>&1 ; sleep 5; done \ No newline at end of file