Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F12741340
export-commits-to-manyrepo.sh
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
553 B
Referenced Files
None
Subscribers
None
export-commits-to-manyrepo.sh
View Options
#!/bin/sh
set
-e
# Parse arguments
if
[
$#
-lt
1
]
;
then
echo
"Usage:
$0
<TARGET REPOSITORY>"
1
>
&
2
exit
1
fi
REPO
=
$1
set
-x
# 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
# Clean up
git checkout main
git branch -D
"
$REPO
"
File Metadata
Details
Attached
Mime Type
text/x-shellscript
Expires
Sun, Nov 16, 13:25 (1 d, 13 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3137046
Default Alt Text
export-commits-to-manyrepo.sh (553 B)
Attached To
Mode
rKERUALD Keruald libraries development repository
Attached
Detach File
Event Timeline
Log In to Comment