summaryrefslogtreecommitdiff
path: root/update_branches
blob: 6728c0007575396e007d12e26e135e34a5ea7b13 (plain)
1
2
3
4
5
6
7
8
9
#!/bin/sh

remotes_pat=`git remote show | sed -e 's|$|/|' | xargs | tr ' ' '|'`

git branch -r | grep -v 'tags/' | egrep -v "$remotes_pat" \
  | sed -e 's/^ *\([^ ]*\)/svn_\1 \1/' \
  | while read local remote; do
     git branch --track -f $local $remote
    done