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

3 messages from 2020-03-30 to 2020-03-30. Participants: Robert P. J. Day, Junio C Hamano.
Thread: https://gitlist.dev/t/53133

## Robert P. J. Day, 2020-03-30 16:16

Subject: why "Not currently on any branch" but no "HEAD detached"?
Message-ID: <alpine.LFD.2.21.2003301211330.14880@localhost.localdomain>
URL: https://gitlist.dev/e/alpine.LFD.2.21.2003301211330.14880%40localhost.localdomain

```

  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, 2020-03-30 16:31

Subject: Re: why "Not currently on any branch" but no "HEAD detached"?
Message-ID: <xmqq8sjhajp2.fsf@gitster.c.googlers.com>
URL: https://gitlist.dev/e/xmqq8sjhajp2.fsf%40gitster.c.googlers.com
In-Reply-To: <alpine.LFD.2.21.2003301211330.14880@localhost.localdomain>

```
"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.

```

## Robert P. J. Day, 2020-03-30 16:39

Subject: Re: why "Not currently on any branch" but no "HEAD detached"?
Message-ID: <alpine.LFD.2.21.2003301238040.15750@localhost.localdomain>
URL: https://gitlist.dev/e/alpine.LFD.2.21.2003301238040.15750%40localhost.localdomain
In-Reply-To: <xmqq8sjhajp2.fsf@gitster.c.googlers.com>

```
On Mon, 30 Mar 2020, Junio C Hamano wrote:

> "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

```
