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

Re: dangling commits

From
Junio C Hamano <junkio@cox.net>
Date
Jan 15, 2006, 22:55 UTC
Message-ID
<7v8xth14pg.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20060115221108.3ED2E352659@atlas.denx.de>
Wolfgang Denk <wd@denx.de> writes:
> Is ther eany way to clean up such a situation and really get  rid  of
> the  dangling  commits?  I understand that I'd first need some way to
> "unpack" the packs, but how to do this? 
The easiest is to repack into a single big ball of wax:
	$ git repack -a -d

If you know the pack the stale object is in, you can move it out of objects/pack/ and repack only that one.

	$ mv .git/objects/packs/pack-$badone.{idx,pack} .
	$ git unpack-objects <pack-$badone.pack
        $ git repack
After you are done:
	$ git prune
Previous: Wolfgang DenkNext: Marco Roeland
Message 6 of 15 in “dangling commits”
  1. Nick WilliamsJan 15, 2006
  2. Andreas EricssonJan 15, 2006
  3. Nick WilliamsJan 15, 2006
  4. Junio C HamanoJan 15, 2006
  5. Wolfgang DenkJan 15, 2006
  6. Junio C HamanoJan 15, 2006
  7. Marco RoelandJan 16, 2006
  8. Junio C HamanoJan 16, 2006
  9. Marco RoelandJan 16, 2006
  10. Andreas EricssonJan 16, 2006
  11. Marco RoelandJan 16, 2006
  12. Andreas EricssonJan 16, 2006
  13. Marco RoelandJan 16, 2006
  14. Wolfgang DenkJan 16, 2006
  15. Marco RoelandJan 16, 2006

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.