Skip to content

Instantly share code, notes, and snippets.

@blmarket
Created January 5, 2014 05:49
Show Gist options
  • Select an option

  • Save blmarket/6e49fa99bdbbc190b28f to your computer and use it in GitHub Desktop.

Select an option

Save blmarket/6e49fa99bdbbc190b28f to your computer and use it in GitHub Desktop.
Simple way to migrate your git repositories... PS> forget about my project names...
#!/bin/bash
projects=( 'chart-comparison' 'codesprint' 'dynamodb-chart-browser' 'navercrawler' 'nodejs-sandbox' 'sandbox-judge' 'scala-hadoop-example' 'skplanetx' 'voiceserver' )
# for var in ${projects[@]}; do
# git clone [email protected]:${var}.git
# done
for var in ${projects[@]}; do
(
cd $var
git remote -v
git remote rm rhs
git remote add rhs [email protected]:${var}.git
git push rhs master
)
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment