git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: Vaclav Hanzl <hanzl@noel.feld.cvut.cz>
Cc: lewiemann@gmail.com, peff@peff.net, git@vger.kernel.org
Subject: Re: Document clone of clone loosing branches?
Date: Sun, 15 Jun 2008 01:03:01 +0200	[thread overview]
Message-ID: <200806150103.02260.jnareb@gmail.com> (raw)
In-Reply-To: <20080614.233645.71097102.hanzl@noel.feld.cvut.cz>

Vaclav Hanzl wrote:
> Jakub Narebski wrote:
>>
>> The idea is for git-clone to clone (by default) _your_ work, not sb
>> else work.  Think about two repositories, fetching from each other:
>> you don't want for branches to proliferate like mad, remote of remote,
>> then remote of remote of remote, and ad infinitum.
>> 
>> Besides there is I think implicit assumption that public repositories
>> one might want to clone are _bare_ repositories, 1:1 or mirror
>> refspecs, which simply do not contain remote tracking branches. 
> 
> Yes. It would be no shame if an explanation like this made it to 'man
> clone'?

The question of course is _what_ to put into git-clone(1), what to
generic documentation in git(1), and what in "Git User's Manual".

> After all, how many other commands do distinguish regular branches and
> remote tracking branches?

Errr... many of them? git-branch treats regular branches (refs/heads/*)
and remote-tracking branches (refs/remotes/<remotename>/*) differently
(compare "git branch" and "git branch -r", and "git branch -a").
git-checkout treats regular branches (can checkout) different from
other refs, including remote-tracking branches (result in detached
HEAD).

> Even if there are any other (I do not know), 
> git-clone is likely the most prominent of them and 'man git-clone' is
> quite good place to document this. Unless it is explained in 'man git'
> itself (I think it is not now).

I'm not sure how it is put in documentation, but I wouldn't wonder
if it is not dicumented, because most of gitters who can write this
documentation do know the difference between regular branches and
remote-tracking branches, and know recoomended workflows and best
practices.
 
> (Thought I am quite happy with UNIX tradition of very exact and very
> condensed man pages, up to the point of being a hard puzzle, and I
> agree that man pages are no tutorial, in this case I would be happy to
> see 'regular branches' and 'remote tracking branches' clearly
> distinguished in 'man git-clone' itself, without an implicit reference
> to 'usual' meaning of words among geeks.)

So, what should be mentioned ar two facts, I think.  (a) that git-clone
copies only regular branches and tags; it does not copy remote-tracking
branches, it does not copy stash, it does not copy reflogs, it does not
copy StGIT stacks...  (b) that recommended workflow (best practice) is
to have public published repository which is bare clone
(1:1 correspondnce) of interesting subset of refs.

-- 
Jakub Narebski
Poland

  parent reply	other threads:[~2008-06-14 23:04 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-14 13:05 Document clone of clone loosing branches? Vaclav Hanzl
2008-06-14 14:31 ` Jeff King
2008-06-14 20:15   ` Document clone of clone ... bug?? Vaclav Hanzl
2008-06-14 20:34     ` Jakub Narebski
2008-06-14 20:48       ` Vaclav Hanzl
2008-06-14 14:31 ` Document clone of clone loosing branches? Jakub Narebski
2008-06-14 14:44 ` Lea Wiemann
2008-06-14 21:36   ` Vaclav Hanzl
2008-06-14 22:18     ` Junio C Hamano
2008-06-15  7:18       ` Vaclav Hanzl
2008-06-14 23:03     ` Jakub Narebski [this message]
2008-06-15  8:40 ` Jakub Narebski
2008-06-15 13:05   ` [PATCH] Documentation: Note about the meaning of "clone" Robin Rosenberg
2008-06-15 13:39     ` Jakub Narebski
2008-06-15 13:52     ` Wincent Colaiuta
2008-06-15 16:31       ` Vaclav Hanzl
2008-06-15 17:03     ` Vaclav Hanzl
2008-06-15 19:12     ` Miklos Vajna
2008-06-15 20:14     ` Junio C Hamano
2008-06-15 13:05   ` PATCH] cvsimport: Clarification on the use of -r Robin Rosenberg

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=200806150103.02260.jnareb@gmail.com \
    --to=jnareb@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=hanzl@noel.feld.cvut.cz \
    --cc=lewiemann@gmail.com \
    --cc=peff@peff.net \
    /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).