Skip to content

Commit 185c087

Browse files
moygitster
authored andcommitted
Documentation: explain push.default option a bit more
The previous documentation was explaining _what_ the options were doing, but were of little help explaining _why_ a user should set his default to either of the options. Signed-off-by: Matthieu Moy <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent d1ca788 commit 185c087

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

Documentation/config.txt

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1680,12 +1680,24 @@ push.default::
16801680
line. Possible values are:
16811681
+
16821682
* `nothing` - do not push anything.
1683-
* `matching` - push all matching branches.
1684-
All branches having the same name in both ends are considered to be
1685-
matching. This is the default.
1683+
* `matching` - push all branches having the same name in both ends.
1684+
This is for those who prepare all the branches into a publishable
1685+
shape and then push them out with a single command. It is not
1686+
appropriate for pushing into a repository shared by multiple users,
1687+
since locally stalled branches will attempt a non-fast forward push
1688+
if other users updated the branch. This is the default.
16861689
* `upstream` - push the current branch to its upstream branch.
1690+
With this, `git push` will update the same remote ref as the one which
1691+
is merged by `git pull`, making `push` and `pull` symmetrical.
1692+
See "branch.<name>.merge" for how to configure the upstream branch.
16871693
* `tracking` - deprecated synonym for `upstream`.
16881694
* `current` - push the current branch to a branch of the same name.
1695+
+
1696+
The `current` and `upstream` modes are for those who want to
1697+
push out a single branch after finishing work, even when the other
1698+
branches are not yet ready to be pushed out. If you are working with
1699+
other people to push into the same shared repository, you would want
1700+
to use one of these.
16891701

16901702
rebase.stat::
16911703
Whether to show a diffstat of what changed upstream since the last

0 commit comments

Comments
 (0)