threads / discuss / 53133

why "Not currently on any branch" but no "HEAD detached"?

Subject: why "Not currently on any branch" but no "HEAD detached"?

## tl;dr

3 messages between Mar 30, 2020 and Mar 30, 2020.

replies: 2people: 2as markdown or json

Robert P. J. Day· Mar 30, 2020, 16:16 UTC · lore
  probably a silly question (and probably related to using an old
version of git), but on a ubuntu 16.04.6 dev system, i used google's
"repo" tool to check out a bunch of git repos, and when i pop into
those git repos and run "git status", i see:
  # Not currently on any branch
  nothing to commit, working tree clean

i'm used to seeing "HEAD detached at <something>" ... is the above just an older style of the same message, given that this system uses git 2.9.2? or is there something else going on here?

rday
-- 
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                         http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================
Junio C Hamano· Mar 30, 2020, 16:31 UTC · re: Robert P. J. Day · lore

Re: why "Not currently on any branch" but no "HEAD detached"?

"Robert P. J. Day" <rpjday@crashcourse.ca> writes:
Show 11 quoted lines
>   probably a silly question (and probably related to using an old
> version of git), but on a ubuntu 16.04.6 dev system, i used google's
> "repo" tool to check out a bunch of git repos, and when i pop into
> those git repos and run "git status", i see:
>
>   # Not currently on any branch
>   nothing to commit, working tree clean
>
> i'm used to seeing "HEAD detached at <something>" ... is the above
> just an older style of the same message, given that this system uses
> git 2.9.2? or is there something else going on here?

b397ea48 (status: show more info than "currently not on any branch", 2013-03-13) is the culprit. We used to just say the HEAD was detached, but for the past 7 years or so, when we know the last branch we were on before detaching, we report the name of the branch.

Robert P. J. Day· Mar 30, 2020, 16:39 UTC · re: Junio C Hamano · lore

Re: why "Not currently on any branch" but no "HEAD detached"?

On Mon, 30 Mar 2020, Junio C Hamano wrote:
Show 19 quoted lines
> "Robert P. J. Day" <rpjday@crashcourse.ca> writes:
>
> >   probably a silly question (and probably related to using an old
> > version of git), but on a ubuntu 16.04.6 dev system, i used google's
> > "repo" tool to check out a bunch of git repos, and when i pop into
> > those git repos and run "git status", i see:
> >
> >   # Not currently on any branch
> >   nothing to commit, working tree clean
> >
> > i'm used to seeing "HEAD detached at <something>" ... is the above
> > just an older style of the same message, given that this system uses
> > git 2.9.2? or is there something else going on here?
>
> b397ea48 (status: show more info than "currently not on any branch",
> 2013-03-13) is the culprit.  We used to just say the HEAD was
> detached, but for the past 7 years or so, when we know the last
> branch we were on before detaching, we report the name of the
> branch.
  got it, thanks.
rday

← back to recent threads