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

Re: error: unlink(.git/refs/remotes/origin/testbranch) failed: was remote does not support deleting refs

From
Dmitry Potapov <dpotapov@gmail.com>
Date
Jul 6, 2008, 18:34 UTC
Message-ID
<37fcd2780807061134l341ac676ueb674a976ce15e6f@mail.gmail.com>
In-Reply-To
<48700FC2.8080307@gmx.de>
Hi,
[please do not top post]
On Sun, Jul 06, 2008 at 02:20:18AM +0200, Martin wrote:
Show 10 quoted lines
>_
> But I get another error:
> $ git push origin :testbranch
> To ssh://myserver.com/my/path/to/repository
>  - [deleted]         testbranch
> error: unlink(.git/refs/remotes/origin/testbranch) failed: No such file_
> or directory
> error: Failed to delete
>_
> Any idea?

It is harmless. It is just that "git push origin :refs/heads/testbranch" cannot remove your local reference to that branch because you already have removed it by running "git branch -d -r origin/testbranch"

Normally you just run "git push origin :refs/heads/testbranch" without "git branch -d -r origin/testbranch" and then you will not have this error.

Dmitry
Previous: MartinNext: Jeff King
Message 3 of 6 in “remote does not support deleting refs”
  1. MartinJul 5, 2008
  2. error: unlink(.git/refs/remotes/origin/testbranch) failed: was remote does not support deleting refsMartin, Jul 6, 2008
  3. Dmitry PotapovJul 6, 2008
  4. Jeff KingJul 8, 2008
  5. Junio C HamanoJul 8, 2008
  6. Dmitry PotapovJul 6, 2008

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.