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

Re: killing a branch

From
Junio C Hamano <junkio@cox.net>
Date
Jan 10, 2006, 10:52 UTC
Message-ID
<7vy81o73t2.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20060110103533.GT3389@suse.de>
Jens Axboe <axboe@suse.de> writes:
>> that having dangling objects in your repository is not a crime,
>> and you do not have to religiously do "git prune" every time.
>
> I know, it just doesn't feel nice!

Sorry, but I can think of only three reasons (and a half) why somebody cannot live with "one git prune at the end of the day before leaving" (or "week" for that matter) workflow:

 * the filesystem quota is too tight and you cannot afford to
   leave unused loose objects around.  May still be true on
   student accounts, perhaps, but I doubt this is much of an
   issue in the modern world anymore.
 * rsync is used to sync from a repository that dropped a branch
   just now, and you do not want to push the garbage out.  Well,
   if you are still using rsync, I'll tell about it to Linus ;-)
   Pushing via git native protocol over ssh would not send
   unreferenced objects out and will not contaminate the other
   end with the garbage.
 * you do not want to leave after starting prune before it
   finishes.  If it is your hobby to watch the paint dry, I
   cannot help you, but you could run prune under nohup (or
   always work inside "screen", which is what I do).
 + having unused things on the disk just does not _feel_ right.
   Well, maybe.  I can argue with a reason but not with a
   feeling.  On a bright side, leaving recently abandoned
   objects around for a while lets you run git-lost-found to
   recover if you accidentally deleted a still-useful branch.
Previous: Jens AxboeNext: Jens Axboe
Message 4 of 7 in “killing a branch”
  1. Jens AxboeJan 10, 2006
  2. Junio C HamanoJan 10, 2006
  3. Jens AxboeJan 10, 2006
  4. Junio C HamanoJan 10, 2006
  5. Jens AxboeJan 10, 2006
  6. Linus TorvaldsJan 10, 2006
  7. Jens AxboeJan 10, 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.