Skip to content

Instantly share code, notes, and snippets.

@dzaporozhets
Created May 27, 2012 09:30
Show Gist options
  • Save dzaporozhets/2803029 to your computer and use it in GitHub Desktop.
Save dzaporozhets/2803029 to your computer and use it in GitHub Desktop.
Clone all branches to local
`git branch -a`.split("\n")[2..-1].map { |name| name = name.gsub("remotes\/origin\/", "").strip; `git checkout -b #{name} origin/#{name}` }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment