All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Teemu Likonen <tlikonen@iki.fi>
Cc: git@vger.kernel.org, James Bowes <jbowes@dangerouslyinc.com>
Subject: Re: error: refs/remotes/origin/HEAD points nowhere!
Date: Wed, 05 Mar 2008 13:24:15 -0800	[thread overview]
Message-ID: <7v7iggn9ts.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: 200803051338.44938.tlikonen@iki.fi

Teemu Likonen <tlikonen@iki.fi> 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).


  reply	other threads:[~2008-03-05 21:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-05 11:38 error: refs/remotes/origin/HEAD points nowhere! Teemu Likonen
2008-03-05 21:24 ` Junio C Hamano [this message]
2008-03-06  7:50   ` Teemu Likonen
2008-03-08 22:40   ` [PATCH] builtin remote rm: remove symbolic refs, too Johannes Schindelin
2008-03-09 10:24     ` Junio C Hamano
2008-03-07 21:02 ` [PATCH/RFC] Make "git remote rm <remote>" remove file refs/remotes/<remote>/HEAD Teemu Likonen
2008-03-07 22:18   ` Teemu Likonen
2008-03-08  1:45   ` Junio C Hamano
2008-03-08  1:46   ` Junio C Hamano
2008-03-08  6:16     ` Teemu Likonen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7v7iggn9ts.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=jbowes@dangerouslyinc.com \
    --cc=tlikonen@iki.fi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.