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

[wishlist] git branch -d -r remotename

From
Sam Vilain <sam@vilain.net>
Date
Mar 18, 2007, 09:36 UTC
Message-ID
<45FD0804.6010401@vilain.net>

I'm finding myself wanting to delete all local branch heads that are already present on a remote.

You wouldn't want it to be too eager about it, and certainly you wouldn't want to use it against any server that isn't considered completely "upstream" of the repository you're doing it on, otherwise if both ends run it and then "git remote prune" the refs will go away.

I think either "git remote prune" or "git branch -d" would be a good place for that.

Thoughts?
Sam.
Next: Sam Vilain
Message 1 of 8 in “[wishlist] git branch -d -r remotename”
  1. Sam VilainMar 18, 2007
  2. Sam VilainMar 18, 2007
  3. Sam VilainMar 18, 2007
  4. Junio C HamanoMar 18, 2007
  5. Sam VilainMar 18, 2007
  6. Junio C HamanoMar 19, 2007
  7. Junio C HamanoMar 19, 2007
  8. (unknown)Sam Vilain, Mar 19, 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.