From: Teemu Likonen Date: Thu, 06 Mar 2008 07:50:44 GMT Subject: Re: error: refs/remotes/origin/HEAD points nowhere! Message-ID: <200803060950.44873.tlikonen@iki.fi> In-Reply-To: <7v7iggn9ts.fsf@gitster.siamese.dyndns.org> Junio C Hamano kirjoitti: > Teemu Likonen writes: > > After a while I start tracking some other remote repository. I do > > this: > > > > git remote add ng git://project-ng/project.git > > > > Then I do "git fetch ng" and probably also "git checkout --track -b > > master-ng ng/master". Then I find the old "origin" useless to me so > > I remove it with "git remote rm origin". > > > > It seems that refs/remotes/origin/HEAD is still left in my > > repository and hence I keep getting these annoying error messages > > all the time. > > > > Well, I know how to delete this file, but I believe that git should > > have deleted it when I called "git remote rm origin". Am I right? > > Good analysis. I would say "git remote rm" should have removed > it and it would be a bug if it didn't. Yes, "git remote rm " certainly doesn't remove the refs/remotes//HEAD file. I can reproduce this bug anytime with current 'master' branch from git://git.kernel.org/pub/scm/git/git.git