From f7353f9d0369d77019fd13dee9f6347320f55ce7 Mon Sep 17 00:00:00 2001 From: Dexoron Date: Wed, 12 Aug 2026 18:03:20 +0800 Subject: [PATCH] fix git sync --- .github/workflows/code-mirror.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/code-mirror.yml b/.github/workflows/code-mirror.yml index 5567e08..a54e615 100644 --- a/.github/workflows/code-mirror.yml +++ b/.github/workflows/code-mirror.yml @@ -32,6 +32,7 @@ jobs: test -n "$GITVERSE_PAT" || { echo 'GITVERSE_PAT is not configured' >&2; exit 1; } remote="https://oauth2:${GITVERSE_PAT}@gitverse.ru/${GITVERSE_ORG}/${GITVERSE_REPO}.git" git remote add gitverse "$remote" - # Populate local refs first, so a manual run mirrors every branch too. - git fetch origin '+refs/heads/*:refs/heads/*' - git push --prune --force gitverse 'refs/heads/*:refs/heads/*' + # Use a private ref namespace: Git will not overwrite the checked-out + # branch, and broken legacy submodule metadata is not traversed. + git fetch --no-recurse-submodules origin '+refs/heads/*:refs/mirror/*' + git push --prune --force gitverse 'refs/mirror/*:refs/heads/*'