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

Re: [PATCH] config doc: rewrite push.default section

From
Philip Oakley <philipoakley@iee.org>
Date
Jun 17, 2013, 18:10 UTC
Message-ID
<F2D994ABCB8442B5A3F71791BAFB7C80@PhilipOakley>
In-Reply-To
<vpq61xc1wnd.fsf@anie.imag.fr>
From: "Matthieu Moy" <Matthieu.Moy@grenoble-inp.fr>
Sent: Monday, June 17, 2013 6:20 PM
Show 34 quoted lines
> "Philip Oakley" <philipoakley@iee.org> writes:
>
>>> +       Note that `--force` applies to all the refs that are pushed,
>>> +       hence using `git push --all --force`, or `git push --force`
>>> +       with `push.default` set to `matching` may override refs 
>>> other
>>> +       than the current branch (including local refs that are
>>> +       strictly behind their remote counterpart). To force a push 
>>> to
>>> +       only one branch, use `git push <remote> +<branch>` instead 
>>> of
>>> +       `--force`.
>>
>> It would be useful to include a real example "e.g. `git push origin
>> +master`", or a link to specifying a refspec "see <refspec>... 
>> above",
>> such that the "+" doesn't get lost in the general text, as push is 
>> one
>> of the first few commands a new user is likely to be looking up (and
>> misunderstanding ;-), so let's make the + obvious
>
> Yes, why not. I'll point to the <refspec> section for detail, and just
> give an example here.
>
>> I did notice that the <refspec>... section doesn't actually associate
>> the "+" with the force action - Am I misunderstanding this?
>
> It says:
>
>  By having the optional leading `+`, you can tell Git to update the
>  <dst> ref even if it is not allowed by default (e.g., it is not a
>  fast-forward.)"
>
> I think it's OK.

I was more noting that there is zero direct association in the text between the --force option, and the "+", and with that, a funny feeling that either (a) they had subtle differences I hadn't understood, or (b) they were exactly the same and the documenation was being too subtle and a cluebat should be applied to the documenation (on the principle I am not a unique fool ;-)

>
> -- 
> Matthieu Moy
> http://www-verimag.imag.fr/~moy/
Maybe...
------- 8< ------- 
From 57d8aaac6b7543919aaf09909c13a180722c0a94 Mon Sep 17 00:00:00 2001
From: Philip Oakley <philipoakley@iee.org>
Date: Mon, 17 Jun 2013 18:47:04 +0100
Subject: [PATCH] git-push doc: +<dst> refspec is --force
Signed-off-by: Philip Oakley <philipoakley@iee.org>
---
 Documentation/git-push.txt | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt
index eb2883c..df92b09 100644
--- a/Documentation/git-push.txt
+++ b/Documentation/git-push.txt
@@ -136,6 +136,8 @@ already exists on the remote side.
  not an ancestor of the local ref used to overwrite it.
  This flag disables the check.  This can cause the
  remote repository to lose commits; use it with care.
+ See also the optional leading `+` <dst> ref specifier in
+ '<refspec>...' above.

 --repo=<repository>::
  This option is only relevant if no <repository> argument is
-- 
1.8.1.msysgit.1
Previous: Matthieu MoyNext: Ramkumar Ramachandra
Message 11 of 12 in “config doc: rewrite push.default section”
  1. config doc: rewrite push.default sectionRamkumar Ramachandra, Jun 16, 2013
  2. Philip OakleyJun 16, 2013
  3. Ramkumar RamachandraJun 18, 2013
  4. Matthieu MoyJun 16, 2013
  5. Ramkumar RamachandraJun 18, 2013
  6. Junio C HamanoJun 17, 2013
  7. Matthieu MoyJun 17, 2013
  8. Junio C HamanoJun 17, 2013
  9. Philip OakleyJun 17, 2013
  10. Matthieu MoyJun 17, 2013
  11. Philip OakleyJun 17, 2013
  12. Ramkumar RamachandraJun 18, 2013

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.