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

Now what: multiple HEAD refs

From
Alex Riesen <raa.lkml@gmail.com>
Date
Dec 15, 2005, 09:05 UTC
Message-ID
<81b0412b0512150105p5bacd6a1j938824ae2ab96858@mail.gmail.com>
Hi,
just a heads-up for everyone tried "git pull" after using "git merge" too much:
$ git pull . ref1 HEAD (notice the space!)

will happily create refs/heads/HEAD. What happens next is not easily to understand: all files suddenly declared "New" by "git status", "git checkout" does not work, reporting "Need a single revision" (which is actually _the_ hint here).

The solution is simple: remove .git/refs/heads/HEAD
Maybe "git fsck-object" can hint on multiple HEADS?
Next: Junio C Hamano
Message 1 of 9 in “Now what: multiple HEAD refs”
  1. Alex RiesenDec 15, 2005
  2. Junio C HamanoDec 15, 2005
  3. Alex RiesenDec 15, 2005
  4. Junio C HamanoDec 15, 2005
  5. Alex RiesenDec 15, 2005
  6. Junio C HamanoDec 15, 2005
  7. Alex RiesenDec 15, 2005
  8. Johannes SchindelinDec 15, 2005
  9. Alex RiesenDec 15, 2005

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.