Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F10
No One
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
zack
Sep 10 2015, 1:15 PM
2015-09-10 13:15:52 (UTC+2)
Size
445 B
Subscribers
None
View Options
#!/bin/bash
if
[
-z
"
$1
"
-o -z
"
$2
"
]
;
then
echo
"Usage: migrate.sh LOCAL_REPO_DIR NEW_REPO_URL"
exit
1
fi
local_repo_dir
=
"
$1
"
new_repo_url
=
"
$2
"
cd
$local_repo_dir
clone_url
=
$(
git remote -v
|
grep ^origin
|
head -n
1
|
cut -f
2
|
sed
's/ .*//'
)
git clone --mirror
$clone_url
tmp-migration
cd
tmp-migration
git push --all
$new_repo_url
git push --tags
$new_repo_url
cd
..
rm -rf tmp-migration
git remote set-url origin
$new_repo_url
File Metadata
Details
Attached
Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
10
Attached To
T1801: List all origins from major phabricator instances
Restricted Paste
Event Timeline
Log In to Comment