Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

25 lines (18 sloc) 0.423 kB
def exit_if_on_the_master_branch
status = `git branch`
if (/\* master/ =~ status)
puts "You need to run this on a non master branch"
exit
end
end
def checkout(branch_name)
`git checkout -b #{branch_name}`
`git checkout #{branch_name}`
end
def exit_if_not_on_the_master_branch
status = `git branch`
if (/\* master/ !~ status)
puts "You need to run this on a master branch"
exit
end
end
Jump to Line
Something went wrong with that request. Please try again.