Created
April 11, 2012 21:17
-
-
Save kwharrigan/2362694 to your computer and use it in GitHub Desktop.
migrate repos to gitolite from old server...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/python | |
import os | |
repos = [''] # list of repo names here... | |
for repo in repos: | |
print repo | |
shortname = repo.split('.git')[0] | |
os.system('git clone --bare me@oldserver:/git/%s' % repo) | |
os.chdir(repo) | |
os.system('git push --all gitolite@newserver:%s' % shortname) | |
os.system('git push --tags gitolite@newserver:%s' % shortname) | |
os.chdir('..') | |
os.system('rm -rf %s' % repo) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment