Skip to content

Instantly share code, notes, and snippets.

@wifecooky
Last active February 16, 2017 05:19
Show Gist options
  • Save wifecooky/f77894473a86b3fa78b1f8b7a8213e7d to your computer and use it in GitHub Desktop.
Save wifecooky/f77894473a86b3fa78b1f8b7a8213e7d to your computer and use it in GitHub Desktop.
GIT関連
#!/bin/bash
# git の remote branch をすべてローカルに clone する
# 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