* [BUG] git-branch -m cannot rename remote branches
@ 2008-06-08 20:57 Jakub Narebski
2008-06-08 22:58 ` Johannes Schindelin
0 siblings, 1 reply; 4+ messages in thread
From: Jakub Narebski @ 2008-06-08 20:57 UTC (permalink / raw)
To: git
I cannot rename remote branch (possibly packed, and possibly with
reflog) using "git branch"
[gitweb/web@git]$ git branch -m refs/remotes/gitweb-caching/master \
refs/remotes/gitweb-kernel.org/master
error: refname refs/heads/refs/remotes/gitweb-caching/master not found
fatal: Branch rename failed
[gitweb/web@git]$ git branch -m gitweb-caching/master \
gitweb-kernel.org/master
error: refname refs/heads/gitweb-caching/master not found
fatal: Branch rename failed
[gitweb/web@git]$ git branch -m remotes/gitweb-caching/master \
remotes/gitweb-kernel.org/master
error: refname refs/heads/remotes/gitweb-caching/master not found
fatal: Branch rename failed
--
Jakub Narebski
Poland
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [BUG] git-branch -m cannot rename remote branches
2008-06-08 20:57 [BUG] git-branch -m cannot rename remote branches Jakub Narebski
@ 2008-06-08 22:58 ` Johannes Schindelin
2008-06-09 7:06 ` Jakub Narebski
0 siblings, 1 reply; 4+ messages in thread
From: Johannes Schindelin @ 2008-06-08 22:58 UTC (permalink / raw)
To: Jakub Narebski; +Cc: git
Hi,
On Sun, 8 Jun 2008, Jakub Narebski wrote:
> I cannot rename remote branch (possibly packed, and possibly with
> reflog) using "git branch"
That is very much by design; a next fetch would get them with their
current name anyway. A "remote prune" should get rid of any stale
branches.
So yes, "branch -m" with remote branches does not make sense.
Ciao,
Dscho
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [BUG] git-branch -m cannot rename remote branches
2008-06-08 22:58 ` Johannes Schindelin
@ 2008-06-09 7:06 ` Jakub Narebski
2008-06-09 12:53 ` Olivier Marin
0 siblings, 1 reply; 4+ messages in thread
From: Jakub Narebski @ 2008-06-09 7:06 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: git
On Mon, 9 Jun 2008, Johannes Schindelin wrote:
> On Sun, 8 Jun 2008, Jakub Narebski wrote:
>
> > I cannot rename remote branch (possibly packed, and possibly with
> > reflog) using "git branch"
>
> That is very much by design; a next fetch would get them with their
> current name anyway. A "remote prune" should get rid of any stale
> branches.
>
> So yes, "branch -m" with remote branches does not make sense.
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.
--
Jakub Narebski
Poland
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [BUG] git-branch -m cannot rename remote branches
2008-06-09 7:06 ` Jakub Narebski
@ 2008-06-09 12:53 ` Olivier Marin
0 siblings, 0 replies; 4+ messages in thread
From: Olivier Marin @ 2008-06-09 12:53 UTC (permalink / raw)
To: Jakub Narebski; +Cc: Johannes Schindelin, git
Jakub Narebski a écrit :
>
> 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.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-06-09 12:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-08 20:57 [BUG] git-branch -m cannot rename remote branches Jakub Narebski
2008-06-08 22:58 ` Johannes Schindelin
2008-06-09 7:06 ` Jakub Narebski
2008-06-09 12:53 ` Olivier Marin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).