class SwiftLibTemplater::InitializeGitRepositoryCommand
Public Class Methods
new(dir)
click to toggle source
# File lib/swift_lib_templater/initialize_git_repository_command.rb, line 4 def initialize(dir) @dir = dir end
Public Instance Methods
execute()
click to toggle source
# File lib/swift_lib_templater/initialize_git_repository_command.rb, line 8 def execute() Dir.chdir(@dir) systemWithoutOutput "git init ." systemWithoutOutput "git commit -m 'Initial commit' --allow-empty" systemWithoutOutput "git checkout -b develop" systemWithoutOutput "git add ." systemWithoutOutput "git commit -m 'Initial import'" end