Last active
October 24, 2017 12:42
-
-
Save dcpc007/4bf9eedfc37609cb6e9921c15302345b to your computer and use it in GitHub Desktop.
Ajouter un track toutes les branches remote d'un dépôt central
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
#!/bin/bash | |
for branch in `git branch -a | grep remotes | grep -v HEAD | grep -v master `; do | |
git br --track ${branch#remotes/origin/} $branch | |
done | |
#or in one line : | |
#for branch in `git branch -a | grep remotes | grep -v HEAD | grep -v master `; do git br --track ${branch#remotes/origin/} $branch ; done | |
#Do a git push --all |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment