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

wrong info from 'git remote show <remote>' about 'git push' configuration

From
ASalexander barakin (aka sash-kan) <alex@barak.in>
Date
Oct 22, 2018, 10:43 UTC
Message-ID
<7871821540204990@iva3-0d9a30469759.qloud-c.yandex.net>

"git remote show <remote>" shows wrong information about not yet configured for 'git push' local ref.

steps to reproduce:
$ git init
$ git remote add origin https://github.com/git/git # for example
$ git pull origin master
$ git remote show origin
...
  Local ref configured for 'git push':
    master pushes to master (up to date)
$
but the local branch "master" is not yet configured to push to remote "master":
1. there is no section '[branch "master"]' (with required content) in the .git/config
2. attempt to push results in error (and that's right):
$ git push
fatal: The current branch master has no upstream branch.
Message 1 of 1 in “wrong info from 'git remote show <remote>' about 'git push' configuration”
  1. alexander barakin (aka sash-kan)Oct 22, 2018

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.