aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails_generator/generators/applications/app/scm/git.rb
blob: 445de6ab42832e6cc89cc7598758f2ed895f40f6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
module Rails
  class Git < Scm
    def self.clone(repos, branch=nil)
      `git clone #{repos}`

      if branch
        `cd #{repos.split('/').last}/`
        `git checkout #{branch}`
      end
    end

    def self.run(command)
      `git #{command}`
    end
  end
end