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

branch{u} not working even though upstream configured

From
SHStefan Haller <lists@haller-berlin.de>
Date
Jul 3, 2024, 11:52 UTC
Message-ID
<a04b3417-4590-48d1-bc6a-88ca44edb36c@haller-berlin.de>

What could be a reason why branch@{u} doesn't work even though the branch does have a remote tracking branch configured?

We have a user who reports the following:
$ git push --set-upstream origin test-456
branch 'test-456' set up to track 'origin/test-456'.
Everything up-to-date
$ git merge-base test-456 test-456@{u}
fatal: upstream branch 'refs/heads/test-456' not stored as a
       remote-tracking branch
Git remote shows that the remote tracking branch is configured as expected:
$ git remote -v show origin
* remote origin
  [...]
  Local branches configured for 'git pull':
    test-456          merges with remote test-456
  Local refs configured for 'git push':
    test-456          pushes to test-456           (up to date)
Any ideas?
Next: Jeff King
Message 1 of 2 in “branch{u} not working even though upstream configured”
  1. Stefan HallerJul 3, 2024
  2. Jeff KingJul 6, 2024

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.