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

renaming remote branches

From
Miles Bader <miles.bader@necel.com>
Date
Apr 16, 2009, 03:27 UTC
Message-ID
<buo3ac9jn18.fsf@dhlpc061.dev.necel.com>
I can "rename" a remote branch by doing:
   git push REMOTE REMOTE/OLD:refs/heads/NEW
   git push REMOTE :OLD

is there any better way to do this (I mean, er... more user-friendly/less-dangerous/... I dunno... "better" :-)?

Also, I note that the old name ("OLD") remains in .git/info/refs, both locally and in the remote; is this a problem? I can update the local .git/info/refs by running "git update-server-info", but I'm not sure how to do in for the remote repo without having a login there...

Thanks,
-miles
-- 
Erudition, n. Dust shaken out of a book into an empty skull.
Next: Jeff King
Message 1 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.