From: Miklos Vajna <vmiklos@frugalware.org>
To: Toby White <toby.o.h.white@googlemail.com>
Cc: git@vger.kernel.org
Subject: Re: Mirroring repository state, with branches and submodules.
Date: Tue, 17 Mar 2009 17:56:35 +0100 [thread overview]
Message-ID: <20090317165635.GB3817@genesis.frugalware.org> (raw)
In-Reply-To: <623D3837-E899-49AF-9A37-F667A311EE58@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 489 bytes --]
On Tue, Mar 17, 2009 at 03:21:40PM +0000, Toby White <toby.o.h.white@googlemail.com> 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 #2: Type: application/pgp-signature, Size: 197 bytes --]
prev parent reply other threads:[~2009-03-17 16:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-17 15:21 Mirroring repository state, with branches and submodules Toby White
2009-03-17 16:56 ` Miklos Vajna [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090317165635.GB3817@genesis.frugalware.org \
--to=vmiklos@frugalware.org \
--cc=git@vger.kernel.org \
--cc=toby.o.h.white@googlemail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox