Re: [PATCH] Added a few examples to git-pull man page.

From: Josef Weidendorfer <Josef.Weidendorfer@gmx.de>
Date: 2005-11-06 06:37:12
On Saturday 05 November 2005 10:27, Junio C Hamano wrote:
> Maybe something like this (I know my wording is quite bad and I
> would appreciate rephrasing it better very much) would be more
> explicit and appropriate?
> 
>     If you intend to do development derived from a remote
>     branch B, have a `Pull:` line to track it, like this:
> 
>         Pull: B:remote-B
> 
>     and have a separate branch my-B to do your development
>     on top of it.  The latter is created by 'git branch my-B
>     remote-B' (or its equivalent, 'git checkout -b my-B
>     remote-B'), and that is the branch you make your own
>     commits.  Run 'git fetch' to keep track of the progress
>     of the remote side, and when you see the tracked remote
>     branch has something new, merge it into your development
>     branch with 'git pull . remote-B', while you are on my-B
>     branch.

It would be good to explicitly mention that exactly this is
already setup for you after cloning: you are prepared to do
local development based on the remote "master", with
	- remote head "B" = remote head "master"
	- local head "remote-B" = local head "origin"
	- local head "my-B" = local head "master"

Hmm. I just looked up the manual page of "git-clone", but it
does not mention this. It also should say that all remote heads
are cloned to local heads with the same name, with one exception:
remote "master" matches local "origin".

This feels really inconsistent. Junio, I think your proposal of
tracking remote "B" with local "origin/B" is a lot better. It
allows to name a local development branch for any remote "B" by
the same local name "B".

We could make heads starting with "origin/" special: Never let
"git commit" update such a head, but give out a warning instead,
that this head should not be changed locally, as it is used for
tracking a remote head. This warning could suggest to do "git branch"
before committing.
This special handling (of "origin/") should not be hardcoded, but
configurable, perhaps in .git/remotes:

	URL: remote-URL
	Prefix: origin/

Josef
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Sun Nov 06 06:08:31 2005

This archive was generated by hypermail 2.1.8 : 2005-11-06 06:08:37 EST