From: "Ivan Baluta via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Ivan Baluta <ivanbaluta.dev@gmail.com>,
Ivan Baluta <ivanbaluta.dev@gmail.com>
Subject: [PATCH v2] doc: clarify push.default=simple behavior
Date: Tue, 26 May 2026 03:58:07 +0000 [thread overview]
Message-ID: <pull.2115.v2.git.1779767888508.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.2115.git.1779433093971.gitgitgadget@gmail.com>
From: Ivan Baluta <ivanbaluta.dev@gmail.com>
The documentation for the 'simple' push mode currently singles out
the centralized workflow, which can cause confusion about its
behavior in other scenarios, such as triangular workflows.
Clarify that 'simple' always pushes the current branch to a branch
of the same name, but only enforces the strict upstream tracking
requirement when pushing back to the same remote being pulled from.
Suggested-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Ivan Baluta <ivanbaluta.dev@gmail.com>
---
doc: clarify push.default=simple in triangular workflows
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-2115%2Fivanbaluta%2Fdoc-push-simple-triangular-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2115/ivanbaluta/doc-push-simple-triangular-v2
Pull-Request: https://github.com/gitgitgadget/git/pull/2115
Range-diff vs v1:
1: 37ff842622 ! 1: 3deb7f5b0c doc: clarify push.default=simple in triangular workflows
@@
## Metadata ##
-Author: ivanbaluta <ivanbaluta.dev@gmail.com>
+Author: Ivan Baluta <ivanbaluta.dev@gmail.com>
## Commit message ##
- doc: clarify push.default=simple in triangular workflows
+ doc: clarify push.default=simple behavior
- The documentation for 'simple' push mode currently focuses on the
- centralized workflow. However, the implementation in builtin/push.c
- falls back to 'current' behavior when pushing to a remote different
- from the upstream (a triangular workflow).
+ The documentation for the 'simple' push mode currently singles out
+ the centralized workflow, which can cause confusion about its
+ behavior in other scenarios, such as triangular workflows.
- Clarify this in the manual to align the documentation with the
- long-standing implementation and prevent user confusion.
+ Clarify that 'simple' always pushes the current branch to a branch
+ of the same name, but only enforces the strict upstream tracking
+ requirement when pushing back to the same remote being pulled from.
- Signed-off-by: ivanbaluta <ivanbaluta.dev@gmail.com>
+ Suggested-by: Junio C Hamano <gitster@pobox.com>
+ Signed-off-by: Ivan Baluta <ivanbaluta.dev@gmail.com>
## Documentation/config/push.adoc ##
-@@ Documentation/config/push.adoc: 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.
+@@ Documentation/config/push.adoc: this is a deprecated synonym for `upstream`.
+ `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 requires that the remote repository to be pushed to is
++known. When pushing back to the same remote you pull from, the
++current branch must also have an upstream tracking branch with the
++same name.
+
-+In a triangular workflow (pushing to a remote different from the upstream),
-+`simple` behaves like `current`.
-++
This mode is the default since Git 2.0, and is the safest option suited for
beginners.
-
Documentation/config/push.adoc | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/Documentation/config/push.adoc b/Documentation/config/push.adoc
index d9112b2260..28132eedfe 100644
--- a/Documentation/config/push.adoc
+++ b/Documentation/config/push.adoc
@@ -41,9 +41,10 @@ this is a deprecated synonym for `upstream`.
`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 requires that the remote repository to be pushed to is
+known. When pushing back to the same remote you pull from, the
+current branch must also have an upstream tracking branch with the
+same name.
+
This mode is the default since Git 2.0, and is the safest option suited for
beginners.
base-commit: 59ff4886a579f4bc91e976fe18590b9ae02c7a08
--
gitgitgadget
prev parent reply other threads:[~2026-05-26 3:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-22 6:58 [PATCH] doc: clarify push.default=simple in triangular workflows Ivan Baluta via GitGitGadget
2026-05-22 8:49 ` Junio C Hamano
2026-05-25 10:32 ` Иван Балута
2026-05-26 3:58 ` Ivan Baluta via GitGitGadget [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=pull.2115.v2.git.1779767888508.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail.com \
--cc=git@vger.kernel.org \
--cc=ivanbaluta.dev@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox