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

Re: [BUG] git-branch -m cannot rename remote branches

From
OMOlivier Marin <dkr+ml.git@free.fr>
Date
Jun 9, 2008, 12:53 UTC
Message-ID
<484D27C9.4000102@free.fr>
In-Reply-To
<200806090906.51937.jnareb@gmail.com>
Jakub Narebski a écrit :
Show 11 quoted lines
> 
> What I really wanted was "git remote rename <old-name> <new-name>",
> together with renaming branches and moving reflogs.  I can do first
> part by editing config file ("git remote rename"/"git remote mv"
> probably would want to assume that user wants to move branches if
> they follow remotes/<old-name>/* calling convention; ask user if it
> is not the case?).  I thought that I could use "git branch -m" for
> the other... I was left with editing packed-refs file (BTW. is leaving
> empty directory 'xx' when packing 'xx/name' branch by design?) and
> moving reflog by hand.
> 
You can use "git update-ref" for that. Maybe something like that:

$ git update-ref <newref> <oldref> $ git update-ref -d <oldref> <newref>

Olivier.
Previous: Jakub Narebski
Message 4 of 4 in “[BUG] git-branch -m cannot rename remote branches”
  1. Jakub NarebskiJun 8, 2008
  2. Johannes SchindelinJun 8, 2008
  3. Jakub NarebskiJun 9, 2008
  4. Olivier MarinJun 9, 2008

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.