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

remote tracking branch deletion problem

From
Thomas Jarosch <thomas.jarosch@intra2net.com>
Date
Dec 19, 2008, 11:57 UTC
Message-ID
<200812191257.18678.thomas.jarosch@intra2net.com>
Hello together,

while playing around with git, I stumbled upon a strange remote tracking branch deletion problem. It seems I'm unable to delete the remote tracking branch "origin/HEAD" using git 1.6.0.5. Here's what I did:

[tomj@storm repo]$ git init Initialized empty Git repository in /tmp/repo/.git/

[tomj@storm repo]$ echo "test" >test [tomj@storm repo]$ git add test [tomj@storm repo]$ git commit -m "Test"

[tomj@storm tmp]$ git clone repo alice Initialized empty Git repository in /tmp/alice/.git/

[tomj@storm alice]$ git branch -r
  origin/HEAD
  origin/master

[tomj@storm alice]$ git branch -r -d origin/HEAD Deleted remote branch origin/HEAD. [tomj@storm alice]$ git branch -r -d origin/master Deleted remote branch origin/master.

[tomj@storm alice]$ ls -al .git/refs/remotes/origin/HEAD -rw-rw---- 1 tomj intra2net 32 19. Dec 12:43 .git/refs/remotes/origin/HEAD [tomj@storm alice]$ git branch -r error: refs/remotes/origin/HEAD points nowhere!

Is this supposed to be? git 1.6.1.rc3.35.gc0ceb shows a similar behavior.

Cheers, Thomas

Next: Michael J Gruber
Message 1 of 2 in “remote tracking branch deletion problem”
  1. Thomas JaroschDec 19, 2008
  2. Michael J GruberDec 19, 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.