Skip to content

Instantly share code, notes, and snippets.

@dcpc007
Last active October 24, 2017 12:42
Show Gist options
  • Save dcpc007/4bf9eedfc37609cb6e9921c15302345b to your computer and use it in GitHub Desktop.
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
#!/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