Page MenuHomeDevCentral

No OneTemporary

diff --git a/_utils/repo/export-commits-to-manyrepo.sh b/_utils/repo/export-commits-to-manyrepo.sh
index cbeedc8..bfb5d98 100755
--- a/_utils/repo/export-commits-to-manyrepo.sh
+++ b/_utils/repo/export-commits-to-manyrepo.sh
@@ -1,25 +1,32 @@
#!/bin/sh
set -e
-# Parses arguments
+# Parse arguments
if [ $# -lt 1 ]; then
echo "Usage: $0 <TARGET REPOSITORY>" 1>&2
exit 1
fi
REPO=$1
set -x
-# Prepares new main branch for $REPO
+# Ensure we've up-to-date information
+git fetch --all
+
+# Prepare new main branch for $REPO
git subtree split -P "$REPO" -b "$REPO"
# Merge new subtree split branch into main
+git fetch $REPO main
git rebase --strategy-option=ours "$REPO" "$REPO"/main
+git checkout $REPO
+git rebase --strategy-option=ours "$REPO"/main
+
# Push new main
-git push "$REPO" "$REPO"/main:main
+git push "$REPO" "$REPO":main
-# Cleans up
+# Clean up
git checkout main
git branch -D "$REPO"

File Metadata

Mime Type
text/x-diff
Expires
Mon, Nov 25, 02:59 (18 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2259404
Default Alt Text
(935 B)

Event Timeline