Volume XXII, number 280Wednesday, October 7, 2026Latest message 54 minutes ago

The Git List

News and archive of git@vger.kernel.org, since April 2005

patchdoc: clarify push.default=simple in triangular workflows

5 messages between May 22, 2026 and Jun 1, 2026, from Ivan Baluta via GitGitGadget, Junio C Hamano, Иван Балута.

Plain Markdown or JSON for tools and agents. Diffs are folded; open one to read it.

Ivan Baluta via GitGitGadgetMay 22, 2026, 06:58 UTC on lore
From: ivanbaluta <ivanbaluta.dev@gmail.com>

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).

Clarify this in the manual to align the documentation with the long-standing implementation and prevent user confusion.

Signed-off-by: ivanbaluta <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-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2115/ivanbaluta/doc-push-simple-triangular-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/2115
 Documentation/config/push.adoc | 3 +++
 1 file changed, 3 insertions(+)
Show changes to Documentation/config/push.adoc +3 −0
diff --git a/Documentation/config/push.adoc b/Documentation/config/push.adoc
index d9112b2260..979e40c3a4 100644
--- a/Documentation/config/push.adoc
+++ b/Documentation/config/push.adoc
@@ -45,6 +45,9 @@ 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.
 +
+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.
 

base-commit: 59ff4886a579f4bc91e976fe18590b9ae02c7a08
-- 
gitgitgadget
Junio C HamanoMay 22, 2026, 08:49 UTC in reply to Ivan Baluta via GitGitGadget on lore

Re: [PATCH] doc: clarify push.default=simple in triangular workflows

"Ivan Baluta via GitGitGadget" <gitgitgadget@gmail.com> writes:
> From: ivanbaluta <ivanbaluta.dev@gmail.com>

Just noticing, but don't you want to spell your name just like you spell it in your e-mails? I.e.,

    From: Ivan Baluta <ivanbaluta.dev@gmail.com>
Use the same name for your sign-off below.
> 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).

It is not just implementation, but that is how it was designed to do.

Whether centralized or triangular, "simple" works as a restricted form as "current", with the same restriction. That is, both "current" and "simple" push out only the current branch to a single destination that is configured, and "simple" insists that the destination has the same name as the local branch.

So I am not sure if this three-line patch adds much value.

I agree that it _is_ confusing that the current text singles out the centralized workflow when describing "simple". But the remedy may not be to add "what happens in triangular, then?", but it may be to clarify that the need to configure the push destination whether your push destination is the same as or different from your upstream, no?

Something along this line, perhaps?
    `simple`;;
    push the current branch with the same name on the remote.
    +
    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.

That way, the description would be more self standing and the readers hopefully do not have to refer to another mode (`current`) to understand what happens, no?

Иван БалутаMay 25, 2026, 10:32 UTC in reply to Junio C Hamano on lore

Re: [PATCH] doc: clarify push.default=simple in triangular workflows

On Fri, May 22, 2026 at 3:49 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 50 quoted lines
>
> "Ivan Baluta via GitGitGadget" <gitgitgadget@gmail.com> writes:
>
> > From: ivanbaluta <ivanbaluta.dev@gmail.com>
>
> Just noticing, but don't you want to spell your name just like you
> spell it in your e-mails?  I.e.,
>
>     From: Ivan Baluta <ivanbaluta.dev@gmail.com>
>
> Use the same name for your sign-off below.
>
> > 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).
>
> It is not just implementation, but that is how it was designed to
> do.
>
> Whether centralized or triangular, "simple" works as a restricted
> form as "current", with the same restriction.  That is, both
> "current" and "simple" push out only the current branch to a single
> destination that is configured, and "simple" insists that the
> destination has the same name as the local branch.
>
> So I am not sure if this three-line patch adds much value.
>
> I agree that it _is_ confusing that the current text singles out the
> centralized workflow when describing "simple".  But the remedy may
> not be to add "what happens in triangular, then?", but it may be to
> clarify that the need to configure the push destination whether your
> push destination is the same as or different from your upstream, no?
>
> Something along this line, perhaps?
>
>     `simple`;;
>     push the current branch with the same name on the remote.
>     +
>     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.
>
> That way, the description would be more self standing and the
> readers hopefully do not have to refer to another mode (`current`)
> to understand what happens, no?
Thanks, I have corrected my name formatting.

I completely agree with your feedback. Your suggested phrasing is indeed much clearer and prevents the reader from having to cross-reference the "current" mode to understand "simple".

I will submit v2 shortly with your suggested text.
Ivan Baluta via GitGitGadgetMay 26, 2026, 03:58 UTC in reply to Ivan Baluta via GitGitGadget on lore

[PATCH v2] doc: clarify push.default=simple behavior

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(-)
Show changes to Documentation/config/push.adoc +4 −3
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
Junio C HamanoJun 1, 2026, 23:33 UTC in reply to Ivan Baluta via GitGitGadget on lore

Re: [PATCH v2] doc: clarify push.default=simple behavior

"Ivan Baluta via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 18 quoted lines
> 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
Looking good.  Thanks.
Show 20 quoted lines
> 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

Back to recent threads