Create GitHub repository

Public
Create gihub repo and push everything. This relies on the `hub` executable being available.
Icons/chart bar
Used 32 times
Created by
T TobiasBales

Usage

Run this command in your Rails app directory in the terminal:

rails app:template LOCATION="https://railsbytes.com/script/z5OsZJ"
Template Source

Review the code before running this template on your machine.

def command?(name)
  `which #{name}`
  $?.success?
end

if !command? 'hub'
  puts 'Hub not installed, skipping repository creation'
  return
end

run 'hub create --private'
run 'hub push origin master --set-upstream'
Comments

Sign up or Login to leave a comment.