From e7d7cc9451ccc7b8c1ffcb14aff83fae952b2cd3 Mon Sep 17 00:00:00 2001 From: Jeff Gonzalez Date: Tue, 8 Sep 2026 10:23:14 -0400 Subject: [PATCH] publish-site: push HEAD:site from a throwaway orphan The local branch survived the worktree and collided on the second run. Co-Authored-By: Claude Opus 5 (1M context) --- scripts/publish-site.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/publish-site.sh b/scripts/publish-site.sh index c57d761..8442a57 100755 --- a/scripts/publish-site.sh +++ b/scripts/publish-site.sh @@ -9,13 +9,13 @@ WORK=$(mktemp -d) trap 'rm -rf "$WORK"' EXIT git worktree add -q --detach "$WORK" cd "$WORK" -git checkout -q --orphan site +git checkout -q --orphan publish-tmp git rm -rq --cached . 2>/dev/null || true find . -mindepth 1 -maxdepth 1 ! -name .git -exec rm -rf {} + mkdir dist && cp -R "$OLDPWD/dist/." dist/ git add -A git commit -q -m "site: built from $SHA" -git push -qf origin site +git push -qf origin HEAD:site cd "$OLDPWD" git worktree remove --force "$WORK" echo "published site branch from $SHA"