git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Differences between git show HEAD and git show head

From
NMNikola Milekic <nikolamilekic@gmail.com>
Date
Sep 17, 2018, 11:22 UTC
Message-ID
<CACU07Yt5vh36tHcHxV-b_5MNLc-RzqGQ7=nkJq-DTqNgmYP+wA@mail.gmail.com>
Hi,

On Windows, when using multiple workspaces and git 2.19.0.windows.1, 'git show HEAD' and 'git show head' return different results when executed from a secondary workspace (the one without the .git directory).

'git show HEAD' shows the HEAD of the current workspace, while git show head shows the HEAD of the main workspace (the one with the .git directory). I find this to be highly misleading, especially for users like myself who are not used to typing HEAD in all caps. Is this indented behavior or a bug?

Thanks.

Best regards, Nikola

Next: Ævar Arnfjörð Bjarmason
Message 1 of 3 in “Differences between git show HEAD and git show head”
  1. Nikola MilekicSep 17, 2018
  2. Ævar Arnfjörð BjarmasonSep 17, 2018
  3. Nikola MilekicSep 17, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.