Created
March 1, 2009 06:38
-
-
Save patmaddox/72246 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
if File.exist?("blackjack") | |
puts "whoops looks like you already have a folder named blackjack" | |
exit | |
end | |
`git clone git://github.com/pat-maddox/blackjack.git` | |
Dir.chdir("blackjack") do | |
remote_branches = `git branch -r`.split("\n").map{|s| s.strip}.reject {|b| b.include? 'master'} | |
remote_branches.each do |remote_branch| | |
local_branch = remote_branch.gsub("origin/", "") | |
`git branch #{local_branch} #{remote_branch}` | |
end | |
puts "done :)" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment