Re: Mirroring repository state, with branches and submodules.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux