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

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

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Jun 17, 2013, 17:20 UTC
Message-ID
<vpq61xc1wnd.fsf@anie.imag.fr>
In-Reply-To
<7B6316FB423B45559A4698FD35D519FC@PhilipOakley>
"Philip Oakley" <philipoakley@iee.org> writes:
Show 13 quoted lines
>> +       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.
-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: Philip OakleyNext: Philip Oakley
Message 10 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.