Skip to content

Instantly share code, notes, and snippets.

@mgax
Created January 17, 2012 18:25
Show Gist options
  • Save mgax/1627973 to your computer and use it in GitHub Desktop.
Save mgax/1627973 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
import os
from subprocess import check_call
def sync_git_svn(repo_path):
check_call(['git', 'svn', 'rebase', '-qq'], cwd=repo_path)
check_call(['git', 'gc', '-q'], cwd=repo_path)
check_call(['git', 'push', '-q'], cwd=repo_path)
def main():
import sys
for repo_path in sys.argv[1:]:
sync_git_svn(repo_path)
# git remote add github [email protected]:eaudeweb/<repo-name>.git
# git push github master
# git branch --set-upstream master github/master
if __name__ == '__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment