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

Re: Renaming the "master" branch without breaking existing clones

From
Taylor Blau <me@ttaylorr.com>
Date
Aug 3, 2020, 16:39 UTC
Message-ID
<20200803163958.GD50799@syl.lan>
In-Reply-To
<xmqqh7tjwvkn.fsf@gitster.c.googlers.com>
On Mon, Aug 03, 2020 at 09:19:52AM -0700, Junio C Hamano wrote:
Show 12 quoted lines
> Taylor Blau <me@ttaylorr.com> writes:
>
> > I am a little uncomfortable with the idea that a 'git pull' would modify
> > 'refs/{heads,tags}' in addition to 'refs/remotes'.
>
> Those who want to rename their own branches should be allowed to do
> so easily when it is convenient for them to do so, whether the
> reason for renaming their local branch is because their upstream
> renamed the branches they are interested in and have good reasons to
> use the same name, or because they made a typo when they created
> their local brnach, but I do not think renaming the local branch
> should be done automatically.
I agree that doing so automatically would not be welcome.

I like your idea in this thread about doing so with a small helper script. I would even be OK with something in contrib that understands '--dry-run' (to print what it would have done) and '--all' (to rename all tracking refs at once).

Thanks, Taylor

Previous: Junio C HamanoNext: Jeff King
Message 4 of 17 in “Renaming the "master" branch without breaking existing clones”
  1. Matt McCutchenAug 3, 2020
  2. Taylor BlauAug 3, 2020
  3. Junio C HamanoAug 3, 2020
  4. Taylor BlauAug 3, 2020
  5. Jeff KingAug 3, 2020
  6. Junio C HamanoAug 3, 2020
  7. Jeff KingAug 3, 2020
  8. Junio C HamanoAug 3, 2020
  9. Jeff KingAug 3, 2020
  10. Junio C HamanoAug 3, 2020
  11. Matt McCutchenAug 4, 2020
  12. Matt McCutchenAug 4, 2020
  13. Junio C HamanoAug 3, 2020
  14. Matt McCutchenAug 3, 2020
  15. Kaartic SivaraamAug 3, 2020
  16. Junio C HamanoAug 3, 2020
  17. Kaartic SivaraamAug 4, 2020

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.