Skip to content

Commit f6b1fb3

Browse files
moygitster
authored andcommitted
Documentation/git-push: document that 'simple' is the default
The default behavior is well documented already in git-config(1), but git-push(1) itself did not mention it at all. For users willing to learn how "git push" works but not how to configure it, this makes the documentation cumbersome to read. Make the git-push(1) page self-contained by adding a short summary of what 'push.default=simple' does, early in the page. Signed-off-by: Matthieu Moy <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent a2558fb commit f6b1fb3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Documentation/git-push.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@ the default `<refspec>` by consulting `remote.*.push` configuration,
3636
and if it is not found, honors `push.default` configuration to decide
3737
what to push (See linkgit:git-config[1] for the meaning of `push.default`).
3838

39+
When neither the command-line nor the configuration specify what to
40+
push, the default behavior is used, which corresponds to the `simple`
41+
value for `push.default`: the current branch is pushed to the
42+
corresponding upstream branch, but as a safety measure, the push is
43+
aborted if the upstream branch does not have the same name as the
44+
local one.
45+
3946

4047
OPTIONS[[OPTIONS]]
4148
------------------

0 commit comments

Comments
 (0)