Skip to content

Commit

Permalink
Implementing method to push new git repo to github
Browse files Browse the repository at this point in the history
  • Loading branch information
James committed May 4, 2008
1 parent 0092900 commit 635c136
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/svn2git/github.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
module Svn2Git
module GitHub

# TODO
def self.push(migration, options = {})

dir = migration.dir
run = "cd #{dir} &&"
`#{run} git remote add origin git@github.com:#{options[:to]}.git`
`#{run} git push origin master`
`#{run} git push --all`
`#{run} git push --tags`
end

end
Expand Down
2 changes: 2 additions & 0 deletions lib/svn2git/migration.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module Svn2Git
class Migration

attr_reader :dir

def initialize(url, options = {})
@url = url
@dir = @url.scan(/[^\/]+/).last
Expand Down

0 comments on commit 635c136

Please sign in to comment.