Re: master^ is not a local branch -- huh?!?
- From
Jay Soffian <jaysoffian@gmail.com>
- Date
- Jan 30, 2010, 05:06 UTC
- Message-ID
- <76718491001292106je41d6e4x7341678c475122db@mail.gmail.com>
- In-Reply-To
- <alpine.LFD.2.00.1001292232130.1681@xanadu.home>
On Fri, Jan 29, 2010 at 11:03 PM, Nicolas Pitre <nico@fluxnic.net> wrote:
> Have a look at http://eagain.net/articles/git-for-computer-scientists/ > > That's one of the clearest explanation of the Git branching model I've > seen.
Ah, I never realized this before, but it doesn't include any discussion/graphic of what a detached HEAD is. It only shows HEAD referring to a named branch.
> There is no contradiction. The "detached HEAD" corresponds to HEAD > pointing at no branch in particular. There is just no current branch in > that case.
Again (referring to my last message), I think Ron's confusion is that "branch" can mean either a branch in the DAG which is your repo's history, or it can mean a named branch (something under .git/refs), and they aren't necessarily the same, although around here when we say "branch" we almost always mean a named branch.
When HEAD is detached and you create a commit, you're effectively creating a branch in the DAG, but this branch is anonymous and subject to garbage collection.
j.