Created
February 6, 2015 12:13
-
-
Save DriftwoodJP/650a539b0fc0835fb819 to your computer and use it in GitHub Desktop.
すべての remote branch を git clone するスクリプト
This file contains hidden or 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
#!/bin/bash | |
# git clone all remote branches locally | |
# https://coderwall.com/p/0ypmka/git-clone-all-remote-branches-locally | |
for branch in `git branch -a | grep remotes | grep -v HEAD | grep -v master `; do | |
git branch --track ${branch#remotes/origin/} $branch | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment