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

The description of push.default=simple is misleading

From
雨欣雨 欣 <yuxin_yuye2024@outlook.com>
Date
Sep 27, 2025, 11:24 UTC
Message-ID
<SJ0PR20MB515802EF2B4A04688D01D2FFE419A@SJ0PR20MB5158.namprd20.prod.outlook.com>
The description of the simple value for push.default differs between https://git-scm.com/docs/git-config and https://git-scm.com/docs/git-push, and the former is misleading:
 
simple - push the current branch with the same name on the remote.
If you are working on a centralized workflow (pushing to the same repository you pull from, which is typically origin), then you need to configure an upstream branch with the same name.
This mode is the default since Git 2.0, and is the safest option suited for beginners.
 
Comparing with the description in https://git-scm.com/docs/git-push:
 
When neither the command-line nor the configuration specifies what to push, the default behavior is used, which corresponds to the simple value for push.default: the current branch is pushed to the corresponding upstream branch, but as a safety measure, the push is aborted if the upstream branch does not have the same name as the local one.
 
In the former, the word "if" makes it sound as though an upstream branch is only required in some cases, but in reality it is always required.
Message 1 of 1 in “The description of push.default=simple is misleading”
  1. 雨 欣Sep 27, 2025

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.