Skip to content

Instantly share code, notes, and snippets.

@DriftwoodJP
Created February 6, 2015 12:13
Show Gist options
  • Save DriftwoodJP/650a539b0fc0835fb819 to your computer and use it in GitHub Desktop.
Save DriftwoodJP/650a539b0fc0835fb819 to your computer and use it in GitHub Desktop.
すべての remote branch を git clone するスクリプト
#!/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