Skip to content

Commit

Permalink
fix: force checkout of gh-pages branch (cotes2020#544)
Browse files Browse the repository at this point in the history
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.

(cherry picked from commit 5402523)
  • Loading branch information
GriceTurrble authored and linkliu committed Apr 10, 2022
1 parent f4f8213 commit 57b94a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 57b94a3

Please sign in to comment.