Skip to content

Commit 5402523

Browse files
authored
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.
1 parent 156c02a commit 5402523

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/deploy.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ setup_gh() {
7777
_no_pages_branch=true
7878
git checkout -b "$PAGES_BRANCH"
7979
else
80-
git checkout "$PAGES_BRANCH"
80+
git checkout -f "$PAGES_BRANCH"
8181
fi
8282
}
8383

0 commit comments

Comments
 (0)