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

Re: dangling blob which is not dangling at all

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 1, 2007, 07:27 UTC
Message-ID
<7vhcnjbtpt.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20070801063209.GA13511@raptus.dandreoli.com>
Domenico Andreoli <cavokz@gmail.com> writes:
> This fixed things and also warned about two heads referring to pruned
> commits, which may be those two commits I removed by hand (I hope).
Exactly.

All refs under .git/refs (the special case of this includes the branch heads in .git/refs/heads) are your _promise_ to git that everything that is reachable from them are supposed to be available in your repository. If you remove specific commits by hand without adjusting the branch ref, you are breaking that promise and git-fsck will notice it as a repository breakage.

If you do not need a branch and everything reachable only from that branch, you can remove that branch (with "git branch -D"), and run git-gc, which internally does the same reachability analysis as git-fsck does and gets rid of objects that are no longer necessary.

Previous: Domenico AndreoliNext: Domenico Andreoli
Message 4 of 8 in “dangling blob which is not dangling at all”
  1. Domenico AndreoliAug 1, 2007
  2. Linus TorvaldsAug 1, 2007
  3. Domenico AndreoliAug 1, 2007
  4. Junio C HamanoAug 1, 2007
  5. Domenico AndreoliAug 1, 2007
  6. Steven GrimmAug 1, 2007
  7. Rogan DawesAug 1, 2007
  8. Domenico AndreoliAug 1, 2007

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.