git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Kevin D <me@ikke.info>
To: Christoph Anton Mitterer <calestyo@scientia.net>
Cc: git@vger.kernel.org
Subject: Re: how to make "full" copy of a repo
Date: Sun, 29 Mar 2015 13:05:06 +0200	[thread overview]
Message-ID: <20150329110506.GC9387@vps892.directvps.nl> (raw)
In-Reply-To: <1427595686.4912.17.camel@scientia.net>

On Sun, Mar 29, 2015 at 04:21:26AM +0200, Christoph Anton Mitterer wrote:
> On Sat, 2015-03-28 at 15:31 +0100, Kevin D wrote: 
> [..]
> 
> > * reflog (history of refs, though, by default disabled for bare
> >   repositories)
> is there a way to get this copied?
> 
> 

No, the reflog is considered something private to the repository, so
there is no way to git it through git clone.

> [..] 
> 
> > git clone --mirror is used for repositories that regularly get updates
> > from the repositories they were cloned from. Though this is not what you
> > want, it's not difficult to reset the refspecs to the default refspecs.
> What do you mean here? What would I need to reset exactly?

git clone --mirror sets up the fetch refspec in such a way that local
refs would get reset to whatever upstream has:

+refs/*:refs/*

So every time you would fetch / pull, all your branches would reflect
the way they are on the mirrored repo (which is why it's called mirror).

The default refspec is:

+refs/heads/*:refs/remotes/origin/*

Which would only fetch heads (branches), and maps them as remote
tracking branches, so that your local branches are left alone.

> > git clone --mirror is the closest you are going to get by only using
> > git.
> I see, thanks :)
> 
> > So to summarize, git clone is only used for cloning history, which means
> > objects and refs, the rest is not part of cloning. To get more, you have
> > to go outside git.
> 
> Thanks :)
> Chris.

  reply	other threads:[~2015-03-29 11:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-28  2:56 how to make "full" copy of a repo Christoph Anton Mitterer
2015-03-28 14:31 ` Kevin D
2015-03-29  2:21   ` Christoph Anton Mitterer
2015-03-29 11:05     ` Kevin D [this message]
2015-03-30 15:22   ` Duy Nguyen
2015-03-30 17:37     ` Junio C Hamano
2015-03-28 18:52 ` Torsten Bögershausen
2015-03-28 20:33   ` Ævar Arnfjörð Bjarmason
2015-03-29  2:22   ` Christoph Anton Mitterer

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150329110506.GC9387@vps892.directvps.nl \
    --to=me@ikke.info \
    --cc=calestyo@scientia.net \
    --cc=git@vger.kernel.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).