Skip to content

Instantly share code, notes, and snippets.

@aristidb
Created March 27, 2009 21:01
Show Gist options
  • Save aristidb/86901 to your computer and use it in GitHub Desktop.
Save aristidb/86901 to your computer and use it in GitHub Desktop.
#!/bin/bash
cd /var/git/flusspferd.git
git remote update
git for-each-ref --format="%(refname)" refs/remotes/|while read ref
do
branch=$(echo $ref|sed -e 's/^refs\/remotes\/[^\/]*\//refs\/heads\//')
echo "$ref => $branch"
git push . $ref:$branch
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment