Skip to content

Instantly share code, notes, and snippets.

@nhoag
Created January 31, 2013 17:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save nhoag/4684574 to your computer and use it in GitHub Desktop.
Save nhoag/4684574 to your computer and use it in GitHub Desktop.
Migrate a Git repo. Original: https://gist.github.com/4593250
#!/bin/bash
src_git="$1"
dst_git="$2"
git clone --mirror ${src_git} migrate
cd migrate
git remote add dst ${dst_git}
git push --mirror dst
cd ..
rm -rf migrate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment