diff --git a/build-utils/travis-apidoc.sh b/build-utils/travis-apidoc.sh index e3bfb57b..3f264a04 100755 --- a/build-utils/travis-apidoc.sh +++ b/build-utils/travis-apidoc.sh @@ -50,7 +50,7 @@ else BRANCH="gh-pages" fi if [ "$BRANCH" != "gh-pages" ]; then - git checkout -B "$BRANCH" "origin/${BRANCH}" + git checkout -b "$BRANCH" "origin/${BRANCH}" || git checkout -b "$BRANCH" fi # Use a temporary branch for the two commits, which allows for a better UI.