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