From: Adam Brewster <adambrewster@gmail.com>
To: Jeffrey Ratcliffe <jeffrey.ratcliffe@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: bundles with multiple branches
Date: Sun, 23 Aug 2009 16:52:40 -0400 [thread overview]
Message-ID: <c376da900908231352o5c5746c0h9e39b80adede66e8@mail.gmail.com> (raw)
In-Reply-To: <30e395780908231336p403c2171ie383a81c3d1bb020@mail.gmail.com>
On Sun, Aug 23, 2009 at 4:36 PM, Jeffrey
Ratcliffe<jeffrey.ratcliffe@gmail.com> wrote:
> I tend to work on multiple machines that don't have direct access to
> each and therefore keep my git repositories in sync using bundles.
>
> This works fine for single branches - but how can I set things up so
> that I can just
>
> $ git pull <bundle>
>
> or
>
> $ git fetch <bundle>
>
> and have git update all branches?
>
1. Make sure you've got all of the refs you want in the bundle. I
usually use `git bundle create ... --all`
2. Set up a remote on the destination side with a url of wherever you
keep bundles (like /media/cdrom) and a fetch line like
refs/heads/*:refs/remotes/source/*
git remote add bundle /media/cdrom
git config --replace-all remotes.bundle.fetch refs/heads/*:refs/remotes/bundle/*
Since your destination machine is likely not connected to the
internet, you may also want copy all of the remotes too. I do that
with
git config --add remotes.bundle.fetch refs/remotes/*:refs/remotes/*
Beware of the use of the name "origin" with setups like this. If you
have branches under refs/remotes/origin/ on the machine you use to
create the bundle, you will should make sure you don't try to copy
refs from refs/heads and refs/remotes/origin to the same place
(because refs/remotes/origin is the natural place to store both).
Adam
next prev parent reply other threads:[~2009-08-23 20:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-23 20:36 bundles with multiple branches Jeffrey Ratcliffe
2009-08-23 20:52 ` Adam Brewster [this message]
2009-08-23 21:04 ` Jeffrey Ratcliffe
2009-08-24 21:42 ` Adam Brewster
2009-08-27 20:03 ` Jeffrey Ratcliffe
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=c376da900908231352o5c5746c0h9e39b80adede66e8@mail.gmail.com \
--to=adambrewster@gmail.com \
--cc=git@vger.kernel.org \
--cc=jeffrey.ratcliffe@gmail.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;
as well as URLs for NNTP newsgroup(s).