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

Bug: Branch rename breaks local downstream branches

From
AVAlex Vallée <avallee@google.com>
Date
Jan 29, 2014, 21:42 UTC
Message-ID
<CAJwg7ssT-BQe+tmRNvhmPgZUsAnA8+jkuU6P-vuMdJPAOwgLMw@mail.gmail.com>

When tracking a local branch, renaming the tracked branch will not update the downstream branch.

See transcript:
    avallee@gust:/tmp/repo (master)$ git co -b foo
    Switched to branch 'foo'
    avallee@gust:/tmp/repo (foo)$ git co -b bar --track
    Branch bar set up to track local branch foo.
    Switched to a new branch 'bar'
    avallee@gust:/tmp/repo (bar)$ git branch foo -m baz
    avallee@gust:/tmp/repo (bar)$ git co bar
    Already on 'bar'
    Your branch is based on 'foo', but the upstream is gone.
      (use "git branch --unset-upstream" to fixup)
    avallee@gust:/tmp/repo (bar)$
Message 1 of 1 in “Bug: Branch rename breaks local downstream branches”
  1. Alex ValléeJan 29, 2014

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.