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

Bad object pointed under refs/head/

From
ZZZheng Zhang <simsicon@gitcafe.com>
Date
Feb 13, 2015, 10:06 UTC
Message-ID
<CAN6kTyfiw6QPk469xV6gyL-+YB5Ca3vNHhEX7daiyn7j536SXQ@mail.gmail.com>
Hi,

I was running some test with Git 1.8.4.5, then I accidentally met a problem that leaded to the following error,

> > error: refs/heads/develop does not point to a valid object!

Turns out that the sha in refs/heads/develop is a bad object id, this happened after merging a branch X to branch develop, but packed-refs is updated to a corrected sha. No other merges at that point.

The fix is easy, just removed refs/heads/develop.

So there were two sha created, one is updated to refs/heads/develop, and the other one which is corrected, updated to packed-refs, Weird.

I am wondering if there is a way to prevent this happening? Is this an ancient bug?

Many thanks
-- 
GitCafe.com
Share a cup of open source

Zhang Zheng
@simsicon
Next: Michael Haggerty
Message 1 of 2 in “Bad object pointed under refs/head/”
  1. Zheng ZhangFeb 13, 2015
  2. Michael HaggertyFeb 14, 2015

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.