From: Stefan Beller Date: Mon, 03 Dec 2018 21:42:59 GMT Subject: Re: [PATCH/RFC v2 0/7] Introduce new commands switch-branch and checkout-files Message-ID: In-Reply-To: On Thu, Nov 29, 2018 at 7:33 AM Duy Nguyen wrote: > > On Wed, Nov 28, 2018 at 9:30 PM Stefan Beller wrote: > > > > On Wed, Nov 28, 2018 at 12:09 PM Duy Nguyen wrote: > > > > > > On Wed, Nov 28, 2018 at 9:01 PM Duy Nguyen wrote: > > > > should we do > > > > something about detached HEAD in this switch-branch command (or > > > > whatever its name will be)? > > > > > > > > This is usually a confusing concept to new users > > > > > > And it just occurred to me that perhaps we should call this "unnamed > > > branch" (at least at high UI level) instead of detached HEAD. It is > > > technically not as accurate, but much better to understand. > > > > or 'direct' branch? > > makes me think, what is an indirect branch? I drew the term from HEAD pointing to a branch pointing to a commit, i.e. HEAD indirectly points to a commit, but in 'direct' branch mode, HEAD contains the commit id. So indirect branch would work for our current 'real' branches. When asked out of context of this discussion, I might add yet another layer of abstraction to make an 'indirect branch', i.e. HEAD pointing to a symbolic ref that points at a branch that points to a commit. The term symref is what we currently use (Just looked into gitglossary, where we distinguish symbolic refs from pseudorefs) for hat I would have called an indirect branch as well. So maybe we need to measure the level of indirection ("How often do we need to dereference the ref/object to get a commit oid?") to come to terms in how to describe the use cases easily. Here is a fun-one: git checkout git checkout --detach Currently the --detach option detaches HEAD from branch pointing at the object id, i.e. it is the same as git checkout whereas when we focus on the levels of indirection it would also be reasonable to have git checkout as a reasonable alternative, where is the branch that is pointed at from the .