Skip to content

Instantly share code, notes, and snippets.

@koic
Last active February 23, 2016 04:37
Show Gist options
  • Save koic/a6006e858b129f200ebe to your computer and use it in GitHub Desktop.
Save koic/a6006e858b129f200ebe to your computer and use it in GitHub Desktop.
Remake archive file for migrate from GH.com to GH:E
mkdir foo
cp migration_archive.tar.gz foo/
cd foo
git init
tar zxvf migration_archive.tar.gz
rm migration_archive.tar.gz
git add *
git commit -m * 'Initial commit'
rm users_*.json teams_*.json organizations_*.json
git commit . -m 'Remove org info'
replace_text 'https\:\/\/github\.com' 'https\:\/\/your\.ghe\.address' # Use https://github.com/koic/dotfiles/blob/master/dot.bash/tips.sh
git diff
git commit . -m 'Replace URL'
mv .git /tmp
tar zcvf your_migration_guid.tar.gz *
rm -rf /tmp/.git
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment