From: Junio C Hamano Date: Wed, 03 Jul 2019 18:17:41 GMT Subject: Re: Submodule "git branch" says (HEAD detached at ) Message-ID: In-Reply-To: Julius Smith writes: > "git branch" in the the submodule directory says "(detached from > )" but this seems to be wrong. I did "git diff > " in the submodule directory to show that it was the C-commit > and not the D-commit as it appeared. Could "git branch" in the > submodule directory be referring to the commit at the time it was > first detached and not updating after a "git submodule update --init" > in the parent? There are "detached from" and "detached at" messages. Their use was somewhat inconsistent in the older version of Git, but at least since 2.4.0 (quoting from Documentation/RelNotes/2.4.0.txt): * The phrasing "git branch" uses to describe a detached HEAD has been updated to agree with the phrasing used by "git status": - When HEAD is at the same commit as when it was originally detached, they now both show "detached at ". - When HEAD has moved since it was originally detached, they now both show "detached from ". Previously, "git branch" always used "from". "git branch" and "git status" should be using the same language to describe the situation.