Skip to content

Commit

Permalink
Documentation/git-push: document that 'simple' is the default
Browse files Browse the repository at this point in the history
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 <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Matthieu Moy authored and Junio C Hamano committed Feb 23, 2016
1 parent a2558fb commit f6b1fb3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Documentation/git-push.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ the default `<refspec>` by consulting `remote.*.push` configuration,
and if it is not found, honors `push.default` configuration to decide
what to push (See linkgit:git-config[1] for the meaning of `push.default`).

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


OPTIONS[[OPTIONS]]
------------------
Expand Down

0 comments on commit f6b1fb3

Please sign in to comment.