Re: error: refs/remotes/origin/HEAD points nowhere!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Teemu Likonen <tlikonen@xxxxxx> 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.

> What is the purpose of this refs/remotes/origin/HEAD in the first place?

To let you say things like "git diff remotes/origin" as a short-hand for
"git diff remotes/origin/master" (or whichever branch 'origin' repository
considered the primary one, which is determined when you cloned from it).

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux