[Top][All Lists]

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

Re: Obscure error/warning/information message from git pull

From: Achim Gratz
Subject: Re: Obscure error/warning/information message from git pull
Date: Sat, 15 Nov 2014 21:48:29 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.51 (gnu/linux)

Alan Mackenzie writes:
> After a "git clone", the copy is not the same as the original.

If you really want an exact copy of your local repository, then just
make a plain copy or do a mirror clone, THis implies making it "bare"
(without a work tree), so you'd then have to move things around so that
you can have your work tree checked out.  But you can do that, it's just
that this is almost never what you want.

> In particular, branches are not preserved.  I don't know, as yet, what else
> fails to be copied, but I have no great confidence in the documentation
> to tell me.

You don't want second generation clone of the Savannah repository, you
want another first generation one.  Again, the most efficient way to do
this is to reference your already existing clone when doing it so that
the actual objects are not transferred again over the net, but taken
from the "master" clone.

> This is confusing.  Is it the case that branches labelled
> "remotes/origin/..." are completely contained within the same repository?

No, they are labels pointing to the (heads of the) corresponding
branches in the upstream repository.  A branch is nothing more than a
label in Git, all you really need to know is the SHA1 for the branch
head to (re-)create it.  You could give them different names in your
clone if you wanted (no, that isn't a good idea either) or drop all but
master and emacs-24 branches by changing the refspecs to be fetched.
You can do this with commands or (often more simply for larger changes)
by just opening the config file in Emacs and writing out what it is you
want Git to do with that repo.

> Is there anywhere in the git documentation, or elsewhere, which lists
> what entities are preserved by "git clone", and which ones are deleted or
> modified?

Yes, the manpage of git clone.  It talks at some length about the
relation of the clone to its upstream (that thing called "origin") and
that should make it pretty clear that two clones will not be exactly
identical if they are pointing to a different upstream.  However, all
the actual objects are indeed copied, so you can modify the upstream
even after the fact and the next git fetch will set things up as you
wanted.  Go ahead and try it, copy that section about the origin in
.git/config from master to emacs-24 and see for yourself.

+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Wavetables for the Terratec KOMPLEXER:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]