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

Re: Deleting remote branch pointed by remote HEAD

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Jan 21, 2009, 15:24 UTC
Message-ID
<49773E48.90302@drmicha.warpmail.net>
In-Reply-To
<e29894ca0901210638t636de791sf27d28893a7a0b65@mail.gmail.com>
Marc-André Lureau venit, vidit, dixit 21.01.2009 15:38:
Show 14 quoted lines
> On Wed, Jan 21, 2009 at 4:33 PM, Michael J Gruber
> <git@drmicha.warpmail.net> wrote:
>> Marc-André Lureau venit, vidit, dixit 21.01.2009 14:02:
>>> Hi
>>>
>>> I deleted a remote branch which was pointed by HEAD, this way: "git
>>> push origin :master"
>>>
>>> Then for almost every git command, I get this error: "error:
>>> refs/remotes/origin/HEAD points nowhere!".
>> You're talking about about the remote git repo, aren't you?
>>
> 
> Sure. But the error is on the local repo.

So, you get these errors on the local repo when dealing with the remote repo, right? I guess this means two things:

1) You are deleting a remote branch
2) Your original report could have been a bit more detailed ;)

In fact, I'm still unsure about your setup and can't reproduce, unless "almost every git command" was vastly exaggerated, and Adeodato's description matches your setup. Does it?

If yes then git has basically no choice, unless you want git to leave HEAD in place as a detached head. This is related to how the symref is resolved, which in turn is related to the issue of removing remote branches, which in turn is related to an issue I've been meaning to look into quite a while ago... So, reproducibility would be nice.

Cheers, Michael

Previous: Marc-André LureauNext: Marc-André Lureau
Message 4 of 24 in “Deleting remote branch pointed by remote HEAD”
  1. Marc-André LureauJan 21, 2009
  2. Michael J GruberJan 21, 2009
  3. Marc-André LureauJan 21, 2009
  4. Michael J GruberJan 21, 2009
  5. Marc-André LureauJan 21, 2009
  6. Jeff KingJan 21, 2009
  7. Daniel BarkalowJan 21, 2009
  8. Boyd Stephen Smith Jr.Jan 21, 2009
  9. Jeff KingJan 21, 2009
  10. Jeff KingJan 21, 2009
  11. Daniel BarkalowJan 21, 2009
  12. Jeff KingJan 21, 2009
  13. Felipe ContrerasMar 12, 2009
  14. Jeff KingMar 12, 2009
  15. Felipe ContrerasMar 12, 2009
  16. Jeff KingMar 12, 2009
  17. Junio C HamanoJan 21, 2009
  18. Felipe ContrerasJan 21, 2009
  19. Jeff KingJan 21, 2009
  20. Felipe ContrerasJan 21, 2009
  21. Adeodato SimóJan 21, 2009
  22. Sitaram ChamartyJan 21, 2009
  23. GUI and detatched HEAD (was Re: Deleting remote branch pointed by remote HEAD)Daniel Barkalow, Jan 21, 2009
  24. Sitaram ChamartyJan 22, 2009

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.