From ef962a1bf9233b59438ab293fee7e916799c5a0c Mon Sep 17 00:00:00 2001 From: cproudlock Date: Sun, 30 Aug 2026 09:57:53 -0400 Subject: [PATCH] Print the first-time path for a new branch on the work PC The work-PC instructions began with 'git checkout ', which fails the first time a branch goes over because it does not exist in that clone yet - exactly the moment somebody follows them most carefully. Nothing to check out, and nothing to merge into either. Now prints both: fetch then checkout -b then push -u the first time, and the checkout/fetch/merge/push cycle afterwards. Scope: product (cherry picked from commit 1fe788a3ed477addf5b8e38cdfc470fd7adf8ea5) --- tools/export-github.sh | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/tools/export-github.sh b/tools/export-github.sh index 907408e8..7c4ca2a5 100755 --- a/tools/export-github.sh +++ b/tools/export-github.sh @@ -274,10 +274,20 @@ fi cat <\shopdb-flask-pub-$BRANCH.bundle $BRANCH - git merge --ff-only FETCH_HEAD - git push origin $BRANCH + + The FIRST time this branch goes over - it does not exist there yet, so + there is nothing to check out and nothing to merge into: + + git fetch \shopdb-flask-pub-$BRANCH.bundle $BRANCH + git checkout -b $BRANCH FETCH_HEAD + git push -u origin $BRANCH + + Every time after that: + + git checkout $BRANCH + git fetch \shopdb-flask-pub-$BRANCH.bundle $BRANCH + git merge --ff-only FETCH_HEAD + git push origin $BRANCH EOF if [ "$BRANCH" != "main" ]; then