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:25 UTC
Message-ID
<7vr77g8jm4.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20060110102207.GP3389@suse.de>
Jens Axboe <axboe@suse.de> writes:
Show 5 quoted lines
> $ rm .git/refs/heads/branch-name
> $ git prune
>
> to rid myself of the branch and associated objects. Is there a faster
> approach?
Perhaps the "official" way is
	$ git branch -d branch-name ;# you may need -D
        $ git prune

but that essentially is the same as what you are doing. Note that having dangling objects in your repository is not a crime, and you do not have to religiously do "git prune" every time.

Previous: Jens AxboeNext: Jens Axboe
Message 2 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.