git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Documentation/git-push: document that 'simple' is the default

From
Matthieu Moy <matthieu.moy@imag.fr>
Date
Feb 23, 2016, 21:04 UTC
Message-ID
<1456261481-23468-1-git-send-email-Matthieu.Moy@imag.fr>
In-Reply-To
<vpqegc3f8bd.fsf@anie.imag.fr>

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>
---
 Documentation/git-push.txt | 7 +++++++
 1 file changed, 7 insertions(+)
diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt
index 32482ce..a992793 100644
--- a/Documentation/git-push.txt
+++ b/Documentation/git-push.txt
@@ -37,6 +37,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]]
 ------------------
-- 
2.7.2.334.g35ed2ae.dirty
Previous: Matthieu MoyNext: Matthieu Moy
Message 7 of 11 in “push: shorten "push.default is unset" warning message”
  1. push: shorten "push.default is unset" warning messageMatthieu Moy, Feb 23, 2016
  2. Junio C HamanoFeb 23, 2016
  3. Matthieu MoyFeb 23, 2016
  4. Jeff KingFeb 24, 2016
  5. Philip OakleyFeb 23, 2016
  6. Matthieu MoyFeb 23, 2016
  7. Documentation/git-push: document that 'simple' is the defaultMatthieu Moy, Feb 23, 2016
  8. 0/2 Remove "push.default unset" warningMatthieu Moy, Feb 25, 2016
  9. 1/2 push: remove "push.default is unset" warning messageMatthieu Moy, Feb 25, 2016
  10. 2/2 Documentation/git-push: document that 'simple' is the defaultMatthieu Moy, Feb 25, 2016
  11. Jeff KingFeb 26, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.