On Tue, Mar 17, 2009 at 03:21:40PM +0000, Toby White <toby.o.h.white@xxxxxxxxxxxxxx> wrote: > git fetch > for BRANCH in $(git branch -r | cut -d / -f 2); do > git checkout $BRANCH > git reset --hard origin/$BRANCH > done > git submodule update --init First, I think you don't handle the case when you have multiple remotes. I don't know if this is a problem for you or not. Second, use plumbing in scripts, git for-each-ref has a stable output format, while git branch may change.
Attachment:
pgpuMIRCoDjFr.pgp
Description: PGP signature