From 5402523ae52a3740bcc15df0b226b2612644945d Mon Sep 17 00:00:00 2001 From: Galen Rice Date: Sat, 2 Apr 2022 07:22:48 -0400 Subject: [PATCH] fix: force checkout of `gh-pages` branch (#544) When using the theme starter, which uses a git submodule, assets loaded from that submodule are "untracked" files in the pages branch working tree. The build can fail at this line due to Git, saying "the following untracked working tree files would be overwritten by checkout". Adding `-f` forces the checkout, overwriting all files. The other deploy steps then take over and rewrite the files as needed. --- tools/deploy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/deploy.sh b/tools/deploy.sh index 14b88eb..5baba00 100755 --- a/tools/deploy.sh +++ b/tools/deploy.sh @@ -77,7 +77,7 @@ setup_gh() { _no_pages_branch=true git checkout -b "$PAGES_BRANCH" else - git checkout "$PAGES_BRANCH" + git checkout -f "$PAGES_BRANCH" fi }