From: Shawn Pearce <spearce@spearce•org>
To: David Woodhouse <dwmw2@infradead•org>
Cc: git@vger•kernel.org
Subject: Re: Clone with local alternates?
Date: Tue, 18 Apr 2006 19:56:58 -0400 [thread overview]
Message-ID: <20060418235658.GB8915@spearce.org> (raw)
In-Reply-To: <1145404132.16166.97.camel@shinybook.infradead.org>
David Woodhouse <dwmw2@infradead•org> wrote:
> Often I want to clone a remote repository but would like to use an
> existing local source tree as 'alternates'.
>
> One way of doing this is to clone the local tree with 'git-clone -l -s',
> find the latest common commit shared with the remote tree to be fetched,
> revert to that with 'git-reset --head $last' and then pulling from the
> remote.
>
> Is that _really_ the best way of doing it though? It would be better if
> we just had a '--local-alternates=/foo' option to git-clone when cloning
> a remote repository.
git clone --reference=/foo git://remote/foo
would do the trick. This is new in 1.3.0. I just noticed its also
not documented in 1.3.0. :-)
--
Shawn.
next prev parent reply other threads:[~2006-04-18 23:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-18 23:48 Clone with local alternates? David Woodhouse
2006-04-18 23:56 ` Shawn Pearce [this message]
2006-04-18 23:59 ` David Woodhouse
2006-04-19 0:19 ` [PATCH] Document git-clone --reference Shawn Pearce
2006-04-19 8:39 ` Clone with local alternates? David Woodhouse
2006-04-19 9:42 ` Eric W. Biederman
2006-04-19 9:36 ` Eric W. Biederman
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=20060418235658.GB8915@spearce.org \
--to=spearce@spearce$(echo .)org \
--cc=dwmw2@infradead$(echo .)org \
--cc=git@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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