Skip to content

Instantly share code, notes, and snippets.

@niqdev
Created November 18, 2016 09:56
Show Gist options
  • Save niqdev/045dc444724afc30addeb8b996c828f4 to your computer and use it in GitHub Desktop.
Save niqdev/045dc444724afc30addeb8b996c828f4 to your computer and use it in GitHub Desktop.
Clone all remote branches at once
#!/bin/bash
for i in $(git branch -r | grep -vE "HEAD|master"); do
git branch --track ${i#*/} $i; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment