Skip to content

Commit b5cbe15

Browse files
committed
doc: clarify difference between push.default simple and current
The documentation made `simple` and `current` sound identical. The difference is that `simple` strictly checks that the upstream tracking branch's name matches the current branch's name.
1 parent 3f2a948 commit b5cbe15

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

Documentation/config/push.adoc

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@ push.default::
1515
Different values are well-suited for
1616
specific workflows; for instance, in a purely central workflow
1717
(i.e. the fetch source is equal to the push destination),
18-
`upstream` is probably what you want. Possible values are:
18+
`simple` is probably what you want. Possible values are:
1919
+
2020
--
2121

2222
* `nothing` - do not push anything (error out) unless a refspec is
2323
given. This is primarily meant for people who want to
2424
avoid mistakes by always being explicit.
2525
26-
* `current` - push the current branch to update a branch with the same
27-
name on the receiving end. Works in both central and non-central
26+
* `current` - push the current branch to update the branch with the same
27+
name on the remote. Works in both central and non-central
2828
workflows.
2929
3030
* `upstream` - push the current branch back to the branch whose
@@ -35,11 +35,13 @@ push.default::
3535
3636
* `tracking` - This is a deprecated synonym for `upstream`.
3737
38-
* `simple` - push the current branch with the same name on the remote.
38+
* `simple` - push the current branch to its upstream tracking branch,
39+
but only if the upstream tracking branch has the same name as the
40+
current branch. (`simple` will fail with an error if the upstream
41+
tracking branch's name doesn't match the current branch's name.)
3942
+
40-
If you are working on a centralized workflow (pushing to the same repository you
41-
pull from, which is typically `origin`), then you need to configure an upstream
42-
branch with the same name.
43+
`simple` will also fail if the current branch doesn't have an upstream
44+
tracking branch configured, unless `push.autoSetupRemote` is enabled.
4345
+
4446
This mode is the default since Git 2.0, and is the safest option suited for
4547
beginners.

0 commit comments

Comments
 (0)