<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/Documentation/gitcli.txt, branch v2.48.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.48.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.48.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2025-01-03T16:23:59Z</updated>
<entry>
<title>gitcli.txt: typeset pathnames as monospace</title>
<updated>2025-01-03T16:23:59Z</updated>
<author>
<name>Martin Ågren</name>
<email>martin.agren@gmail.com</email>
</author>
<published>2025-01-03T11:33:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b67a603f6360051f174a00f8d10dc088dc7093be'/>
<id>urn:sha1:b67a603f6360051f174a00f8d10dc088dc7093be</id>
<content type='text'>
Commit 1bc1e94091 (doc: option value may be separate for valid reasons,
2024-11-25) added a paragraph discussing tilde-expansion of, e.g.,
~/directory/file.

The tilde character has a special meaning to asciidoc tools. In this
particular case, AsciiDoc matches up the two tildes in "e.g.
~/directory/file or ~u/d/f" and sets the text between them using
subscript. In the manpage, where subscripting is not possible, this
renders as "e.g.  /directory/file oru/d/f".

These paths are literal values, which our coding guidelines want typeset
as verbatim using backticks. Do that. One effect of this is indeed that
the asciidoc tools stop interpreting tilde and other special characters.

Signed-off-by: Martin Ågren &lt;martin.agren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>doc: option value may be separate for valid reasons</title>
<updated>2024-11-25T05:20:15Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-11-25T03:14:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1bc1e940918cd44cc78bff1dfd518e16fc5bad57'/>
<id>urn:sha1:1bc1e940918cd44cc78bff1dfd518e16fc5bad57</id>
<content type='text'>
Even though `git help cli` recommends users to prefer using
"--option=value" over "--option value", there can be reasons why
giving them separately is a good idea.  One reason is that shells do
not perform tilde expansion for `--option=~/path/name` but they
expand `--options ~/path/name` just fine.

This is not a problem for many options whose option parsing is
properly written using OPT_FILENAME(), because the value given to
OPT_FILENAME() is tilde-expanded internally by us, but some commands
take a pathname as a mere string, which needs this trick to have the
shell help us.

I think the reason we originally decided to recommend the stuck form
was because an option that takes an optional value requires you to
use it in the stuck form, and it is one less thing for users to
worry about if they get into the habit to always use the stuck form.
But we should be discouraging ourselves from adding an option with
an optional value in the first place, and we might want to weaken
the current recommendation.

In any case, let's describe this one case where it is necessary to
use the separate form, with an example.

Reviewed-by: Eric Sunshine &lt;sunshine@sunshineco.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>gitcli: drop mention of “non-dashed form”</title>
<updated>2024-03-01T18:45:01Z</updated>
<author>
<name>Kristoffer Haugsbakk</name>
<email>code@khaugsbakk.name</email>
</author>
<published>2024-03-01T18:05:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7a96b75e05953d377b42b01e171f884357772611'/>
<id>urn:sha1:7a96b75e05953d377b42b01e171f884357772611</id>
<content type='text'>
Git builtins used to be called like e.g. `git-commit`, not `git
commit` (*dashed form* and *non-dashed form*, respectively). The dashed
form was deprecated in version 1.5.4 (2006). Now only a few commands
have an alternative dashed form when `SKIP_DASHED_BUILT_INS` is
active.[1]

The mention here is from 2f7ee089dff (parse-options: Add a gitcli(5) man
page., 2007-12-13), back when the deprecation was relatively
recent. These days though it seems like an irrelevant point to make to
budding CLI scripters—you don’t have to warn against a style that
probably doesn’t even work on their git(1) installation.

† 1: 179227d6e21 (Optionally skip linking/copying the built-ins,
    2020-09-21)

Signed-off-by: Kristoffer Haugsbakk &lt;code@khaugsbakk.name&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>documentation: add missing article</title>
<updated>2023-10-09T19:06:29Z</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2023-10-08T06:45:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0a4f051f9318c3dd9db69c4bebecdc6d160a5fc6'/>
<id>urn:sha1:0a4f051f9318c3dd9db69c4bebecdc6d160a5fc6</id>
<content type='text'>
Diff best viewed with --color-diff.

Signed-off-by: Elijah Newren &lt;newren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>documentation: fix singular vs. plural</title>
<updated>2023-10-09T19:06:29Z</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2023-10-08T06:45:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6cc668c0abd65415a461c6dddfefffaaeb1d5adc'/>
<id>urn:sha1:6cc668c0abd65415a461c6dddfefffaaeb1d5adc</id>
<content type='text'>
Diff best viewed with --color-diff.

Signed-off-by: Elijah Newren &lt;newren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>documentation: fix verb tense</title>
<updated>2023-10-09T19:06:29Z</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2023-10-08T06:45:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5676b04a44935752314483182114069ecabe230a'/>
<id>urn:sha1:5676b04a44935752314483182114069ecabe230a</id>
<content type='text'>
Diff best viewed with --color-diff.

Signed-off-by: Elijah Newren &lt;newren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git-cli.txt: clarify "options first and then args"</title>
<updated>2022-01-17T19:42:25Z</updated>
<author>
<name>Teng Long</name>
<email>dyroneteng@gmail.com</email>
</author>
<published>2022-01-17T08:21:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c11f95010cc9f09ea3e5d401bc14c9b6663d2893'/>
<id>urn:sha1:c11f95010cc9f09ea3e5d401bc14c9b6663d2893</id>
<content type='text'>
There are some commands permit the user whether to provide options
first before args, or the reverse order. For example:

    git push --dry-run &lt;remote&gt; &lt;ref&gt;

And:

    git push &lt;remote&gt; &lt;ref&gt; --dry-run

Both of them is supported, but some commands do not, for instance:

     git ls-remote --heads &lt;remote&gt;

And:

     git ls-remote &lt;remote&gt; --heads

If &lt;remote&gt; only has one ref and it's name is "refs/heads/--heads", you
will get the same result, otherwise will not.This is because the former
in the second example will parse "--heads" as an "option" which means
to limit to only "refs/heads" when listing the remote references, the
latter treat "--heads" as an argument which means to filter the result
list with the given pattern.

Therefore, we want to specify a bit more in "gitcli.txt" about the way
we recommend and help to resolve the ambiguity around some git command
usage. The related disscussions locate at [1].

By the way, there are some issues with lowercase letters in the document,
which have been modified together.

[1] https://public-inbox.org/git/cover.1642129840.git.dyroneteng@gmail.com/

Signed-off-by: Teng Long &lt;dyroneteng@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jc/doc-single-h-is-for-help'</title>
<updated>2020-03-11T17:58:16Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-03-11T17:58:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=cdef998b4619cb9acfe2955fcbe9db0ea2f46d33'/>
<id>urn:sha1:cdef998b4619cb9acfe2955fcbe9db0ea2f46d33</id>
<content type='text'>
Both "git ls-remote -h" and "git grep -h" give short usage help,
like any other Git subcommand, but it is not unreasonable to expect
that the former would behave the same as "git ls-remote --head"
(there is no other sensible behaviour for the latter).  The
documentation has been updated in an attempt to clarify this.

* jc/doc-single-h-is-for-help:
  Documentation: clarify that `-h` alone stands for `help`
</content>
</entry>
<entry>
<title>Documentation: clarify that `-h` alone stands for `help`</title>
<updated>2020-02-27T22:14:01Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-02-27T16:10:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1ff466c018692d0ac7c5f30a449632659e87a73b'/>
<id>urn:sha1:1ff466c018692d0ac7c5f30a449632659e87a73b</id>
<content type='text'>
We seem to be getting new users who get confused every 20 months or
so with this "-h consistently wants to give help, but the commands
to which `-h` may feel like a good short-form option want it to mean
something else." compromise.

Let's make sure that the readers know that `git cmd -h` (with no
other arguments) is a way to get usage text, even for commands like
ls-remote and grep.

Also extend the description that is already in gitcli.txt, as it is
clear that users still get confused with the current text.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'dl/lore-is-the-archive'</title>
<updated>2019-12-06T23:09:24Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-12-06T23:09:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=56e6c16394493ebcd6b00a158f5db1e6fe7c58e7'/>
<id>urn:sha1:56e6c16394493ebcd6b00a158f5db1e6fe7c58e7</id>
<content type='text'>
Publicize lore.kernel.org mailing list archive and use URLs
pointing into it to refer to notable messages in the documentation.

* dl/lore-is-the-archive:
  doc: replace LKML link with lore.kernel.org
  RelNotes: replace Gmane with real Message-IDs
  doc: replace MARC links with lore.kernel.org
</content>
</entry>
</feed>
