lilypond-devel
[Top][All Lists]
Advanced

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

Re: Issue 2100: Explanation of branches for CG (issue 5539062)


From: David Kastrup
Subject: Re: Issue 2100: Explanation of branches for CG (issue 5539062)
Date: Wed, 18 Jan 2012 11:33:13 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)

Janek Warchoł <address@hidden> writes:

> 2012/1/17 Graham Percival <address@hidden>:
>>> http://codereview.appspot.com/5539062/diff/3004/Documentation/contributor/source-code.itexi#newcode297
>>> Documentation/contributor/source-code.itexi:297: git branch dev/cg
>>> I think it would be good to be verbose, because it will give people more
>>> information about using git (and they won't have to ask certain
>>> questions).  In this case i would suggest
>>>
>>> git branch dev/cg --track origin/master
>>
>> But we don't want it to track origin/master, do we?  People should
>> merge from master manually (covered in this section).
>
> If i understand git manual correctly, --track only tells git from
> which remote branch it should pull.  It doesn't tell git to pull
> automatically.

Yes.

> I've created a branch with --track, i'll see if anything happens to it
> automatically.

When you check out the branch, git tells you something like "Your branch
is xxx commits ahead of ...".  Nothing happens to the branch, but you
get informational stuff like that sometimes.

>> ... but *this* confuses me.  How can git switch to a remote branch?
>>  Aren't all branches local?  I mean, whenever you switch to a
>> "remote" branch, doesn't that just create a local copy of the remote
>> branch, then put you on that local branch?
>
> Yes, i think it works like that (and still these are called "remote
> branches").  My wording was misleading.

It does not really work like that.  When you checkout a remote branch,
you get put on a detached HEAD.  Whatever you do will get lost (except
from your repository's reflog) when you switch to another branch.

git checkout origin

is the same as

git checkout origin~0

In either case, what you do subsequently has no reference except the
current HEAD.  It's scratch pad work.

-- 
David Kastrup




reply via email to

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