Page MenuHomeSoftware Heritage
Authored By
zack
Sep 10 2015, 1:15 PM
Size
445 B
Subscribers
None
#!/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

Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
10

Event Timeline