Last active
August 29, 2015 14:15
-
-
Save iluwatar/fac18d5ada9216ff13c4 to your computer and use it in GitHub Desktop.
git_deep_clone_repository
This file contains 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
cd <work dir> | |
git clone <src repository url> | |
cd <work dir>/<src repository> | |
for branch in `git branch -a | grep remotes | grep -v HEAD | grep -v master`; do | |
git branch --track ${branch##*/} $branch | |
done | |
git remote rm origin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment