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

Re: renaming remote branches

From
Jeff King <peff@peff.net>
Date
Apr 17, 2009, 12:07 UTC
Message-ID
<20090417120741.GD29121@coredump.intra.peff.net>
In-Reply-To
<buomyagf6g7.fsf@dhlpc061.dev.necel.com>
On Fri, Apr 17, 2009 at 09:51:36AM +0900, Miles Bader wrote:
> E.g., a project has a long-term public branch "oink" which is finally
> merged to master, and thereafter ceases to be kept up-to-date.
> Sometimes the developers are reluctant to delete it becaue they want to
> keep the history around.  However simply leaving it in place can be

For some definition of "history", I suppose. Everything of interest should now be part of the history of "master", except:

  1.  you can no longer refer to the branch by name (but why would you
      want to, if it is now obsolete?)
  2. the reflog history for oink would be gone (but that will be gone
     anyway after the 90-day expiration period)

So I think it is a case of those developers being overly cautious. But I respect the fact that it is sometimes easier to simply move the branches than try to convince them otherwise.

If you were keeping reflogs forever for auditing purposes (as has been discussed elsewhere in the thread about gentoo), then I can see some point to (2). But in such a workflow, your "delete and create" strategy doesn't help at all, as the reflog is still purged. You would want to disable branch deletion entirely in such a workflow, and use a first-class move command. So a first-class "move remote branch" operation would be useful there.

-Peff
Previous: Miles BaderNext: Dmitry Potapov
Message 8 of 9 in “renaming remote branches”
  1. Miles BaderApr 16, 2009
  2. Jeff KingApr 16, 2009
  3. Miles BaderApr 16, 2009
  4. Jeff KingApr 16, 2009
  5. Jay SoffianApr 16, 2009
  6. Jeff KingApr 16, 2009
  7. Miles BaderApr 17, 2009
  8. Jeff KingApr 17, 2009
  9. Dmitry PotapovApr 17, 2009

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.