doc: clarify push.default=simple behavior
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> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Ivan Baluta committed
May 26, 2026 at 03:58 UTC
b2040bfafe0f7bbbd21cf65a903d2346d602f421
1 file changed
+4
-3
Documentation/config/push.adoc
+4
-3
@@ -41,9 +41,10 @@ this is a deprecated synonym for `upstream`.
41
`simple`;;
42
push the current branch with the same name on the remote.
43
+
44
-If you are working on a centralized workflow (pushing to the same repository you
45
-pull from, which is typically `origin`), then you need to configure an upstream
46
-branch with the same name.
44
+This mode requires that the remote repository to be pushed to is
45
+known. When pushing back to the same remote you pull from, the
46
+current branch must also have an upstream tracking branch with the
47
+same name.
48
+
49
This mode is the default since Git 2.0, and is the safest option suited for
50
beginners.