瀏覽代碼

Fix branch nuking

Robert Muir 10 年之前
父節點
當前提交
f604182f8c
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      migrate.sh

+ 2 - 1
migrate.sh

@@ -105,7 +105,8 @@ rm -rf target
 # echo "## create git $GIT_BRANCH work branch"
 # echo "## create git $GIT_BRANCH work branch"
 
 
 # It first clean the existing branch if any
 # It first clean the existing branch if any
-git branch -D $GIT_BRANCH > /dev/null
+echo "(You can safely ignore branch not found below)"
+git branch -D $GIT_BRANCH > /dev/null || :
 
 
 # Create the new branch
 # Create the new branch
 git branch $GIT_BRANCH > /dev/null
 git branch $GIT_BRANCH > /dev/null