<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/Documentation/git-clone.txt, branch v2.22.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.22.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.22.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2019-07-02T19:11:40Z</updated>
<entry>
<title>docs: git-clone: list short form of options first</title>
<updated>2019-07-02T19:11:40Z</updated>
<author>
<name>Quentin Nerden</name>
<email>quentin.nerden@intel.com</email>
</author>
<published>2019-07-02T14:37:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bfc8c84ed560af8f74be32fa0fd2568e28161678'/>
<id>urn:sha1:bfc8c84ed560af8f74be32fa0fd2568e28161678</id>
<content type='text'>
List the short form of options (e.g.: '-l') before the long form (e.g.
'--local').
This is to match the doc of git-add, git-commit, git-clean, git-branch...

Signed-off-by: Quentin Nerden &lt;quentin.nerden@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>docs: git-clone: refer to long form of options</title>
<updated>2019-07-02T19:11:38Z</updated>
<author>
<name>Quentin Nerden</name>
<email>quentin.nerden@intel.com</email>
</author>
<published>2019-07-02T14:37:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3711d1cd8984d69b61b3a3626aa88ba52fa32d48'/>
<id>urn:sha1:3711d1cd8984d69b61b3a3626aa88ba52fa32d48</id>
<content type='text'>
To make the doc of git-clone easier to read,
refer to the long form of the options
(it is easier to guess what '--verbose' is doing than '-v').

Signed-off-by: Quentin Nerden &lt;quentin.nerden@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>clone: send server options when using protocol v2</title>
<updated>2019-04-18T01:53:51Z</updated>
<author>
<name>Jonathan Tan</name>
<email>jonathantanmy@google.com</email>
</author>
<published>2019-04-12T19:51:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6e98305985555ced61971ca0170dd976554193c0'/>
<id>urn:sha1:6e98305985555ced61971ca0170dd976554193c0</id>
<content type='text'>
Commit 5e3548ef16 ("fetch: send server options when using protocol v2",
2018-04-24) taught "fetch" the ability to send server options when using
protocol v2, but not "clone". This ability is triggered by "-o" or
"--server-option".

Teach "clone" the same ability, except that because "clone" already
has "-o" for another parameter, teach "clone" only to receive
"--server-option".

Explain in the documentation, both for clone and for fetch, that server
handling of server options are server-specific. This is similar to
receive-pack's handling of push options - currently, they are just sent
to hooks to interpret as they see fit.

Signed-off-by: Jonathan Tan &lt;jonathantanmy@google.com&gt;
Reviewed-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Documentation/clone: document ignored configuration variables</title>
<updated>2018-11-16T04:15:21Z</updated>
<author>
<name>SZEDER Gábor</name>
<email>szeder.dev@gmail.com</email>
</author>
<published>2018-11-14T10:46:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7eae4a3ac4084e6f01bbab2847a399ea5677a099'/>
<id>urn:sha1:7eae4a3ac4084e6f01bbab2847a399ea5677a099</id>
<content type='text'>
Due to limitations in the current implementation, some configuration
variables specified via 'git clone -c var=val' (or 'git -c var=val
clone') are ignored during the initial fetch and checkout.

Let the users know which configuration variables are known to be
ignored ('remote.origin.mirror' and 'remote.origin.tagOpt') under the
documentation of 'git clone -c', along with hints to use the options
'--mirror' and '--no-tags' instead.

Signed-off-by: SZEDER Gábor &lt;szeder.dev@gmail.com&gt;
Reviewed-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'nd/doc-header'</title>
<updated>2018-05-23T05:38:22Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-05-23T05:38:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6b0f1d9c475038a54343c007193f1c81ae82b959'/>
<id>urn:sha1:6b0f1d9c475038a54343c007193f1c81ae82b959</id>
<content type='text'>
Doc formatting fix.

* nd/doc-header:
  doc: keep first level section header in upper case
</content>
</entry>
<entry>
<title>doc: keep first level section header in upper case</title>
<updated>2018-05-02T08:03:33Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2018-04-30T15:35:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=76a8788c141e9d4e2713acaa7886475fb6b27ca5'/>
<id>urn:sha1:76a8788c141e9d4e2713acaa7886475fb6b27ca5</id>
<content type='text'>
When formatted as a man page, 1st section header is always in upper
case even if we write it otherwise. Make all 1st section headers
uppercase to keep it close to the final output.

This does affect html since case is kept there, but I still think it's
a good idea to maintain a consistent style for 1st section headers.

Some sections perhaps should become second sections instead, where
case is kept, and for better organization. I will update if anyone has
suggestions about this.

While at there I also make some header more consistent (e.g. examples
vs example) and fix a couple minor things here and there.

Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>doc/clone: update caption for GIT URLS cross-reference</title>
<updated>2018-04-19T23:23:56Z</updated>
<author>
<name>Todd Zullinger</name>
<email>tmz@pobox.com</email>
</author>
<published>2018-04-19T17:32:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=73364e4f109061fa686eb408c70615ca1941129a'/>
<id>urn:sha1:73364e4f109061fa686eb408c70615ca1941129a</id>
<content type='text'>
The description of the &lt;repository&gt; argument directs readers to "See the
URLS section below".  When generating HTML this becomes a link to the
"GIT URLS" section.  When reading the man page in a terminal, the
caption is slightly misleading.  Use "GIT URLS" as the caption to avoid
any confusion.

Signed-off-by: Todd Zullinger &lt;tmz@pobox.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Documentation/git-clone: improve description for submodule recursing</title>
<updated>2017-12-05T19:30:38Z</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2017-12-05T02:53:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bc29b0b9710322ea966a685903e4334a61931fc5'/>
<id>urn:sha1:bc29b0b9710322ea966a685903e4334a61931fc5</id>
<content type='text'>
There have been a few complaints on the mailing list that git-clone doesn't
respect the `submodule.recurse` setting, which every other command (that
potentially knows how to deal with submodules) respects.  In case of clone
this is not beneficial to respect as the user may not want to obtain all
submodules (assuming a pathspec of '.').

Improve the documentation such that the pathspec is mentioned in the
synopsis to alleviate the confusion around the submodule recursion flag
in git-clone.

While at it clarify that the option can be given multiple times for complex
pathspecs.

Signed-off-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>clone: add a --no-tags option to clone without tags</title>
<updated>2017-05-01T02:09:44Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2017-04-26T23:12:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0dab2468ee5bbfaa854a22eb17c70647fc8b6b83'/>
<id>urn:sha1:0dab2468ee5bbfaa854a22eb17c70647fc8b6b83</id>
<content type='text'>
Add a --no-tags option to clone without fetching any tags.

Without this change there's no easy way to clone a repository without
also fetching its tags.

When supplying --single-branch the primary remote branch will be
cloned, but in addition tags will be followed &amp; retrieved. Now
--no-tags can be added --single-branch to clone a repository without
tags, and which only tracks a single upstream branch.

This option works without --single-branch as well, and will do a
normal clone but not fetch any tags.

Many git commands pay some fixed overhead as a function of the number
of references. E.g. creating ~40k tags in linux.git will cause a
command like `git log -1 &gt;/dev/null` to run in over a second instead
of in a matter of milliseconds, in addition numerous other things will
slow down, e.g. "git log &lt;TAB&gt;" with the bash completion will slowly
show ~40k references instead of 1.

The user might want to avoid all of that overhead to simply use a
repository like that to browse the "master" branch, or something like
a CI tool might want to keep that one branch up-to-date without caring
about any other references.

Without this change the only way of accomplishing this was either by
manually tweaking the config in a fresh repository:

    git init git &amp;&amp;
    cat &gt;git/.git/config &lt;&lt;EOF &amp;&amp;
    [remote "origin"]
        url = git@github.com:git/git.git
        tagOpt = --no-tags
        fetch = +refs/heads/master:refs/remotes/origin/master
    [branch "master"]
        remote = origin
        merge = refs/heads/master
    EOF
    cd git &amp;&amp;
    git pull

Which requires hardcoding the "master" name, which may not be the main
--single-branch would have retrieved, or alternatively by setting
tagOpt=--no-tags right after cloning &amp; deleting any existing tags:

    git clone --single-branch git@github.com:git/git.git &amp;&amp;
    cd git &amp;&amp;
    git config remote.origin.tagOpt --no-tags &amp;&amp;
    git tag -l | xargs git tag -d

Which of course was also subtly buggy if --branch was pointed at a
tag, leaving the user in a detached head:

    git clone --single-branch --branch v2.12.0 git@github.com:git/git.git &amp;&amp;
    cd git &amp;&amp;
    git config remote.origin.tagOpt --no-tags &amp;&amp;
    git tag -l | xargs git tag -d

Now all this complexity becomes the much simpler:

    git clone --single-branch --no-tags git@github.com:git/git.git

Or in the case of cloning a single tag "branch":

    git clone --single-branch --branch v2.12.0 --no-tags git@github.com:git/git.git

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>clone: teach --recurse-submodules to optionally take a pathspec</title>
<updated>2017-03-18T16:51:23Z</updated>
<author>
<name>Brandon Williams</name>
<email>bmwill@google.com</email>
</author>
<published>2017-03-17T22:38:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bb62e0a99fcbb9ceb03502bf2168d2e57530214f'/>
<id>urn:sha1:bb62e0a99fcbb9ceb03502bf2168d2e57530214f</id>
<content type='text'>
Teach clone --recurse-submodules to optionally take a pathspec argument
which describes which submodules should be recursively initialized and
cloned.  If no pathspec is provided, --recurse-submodules will
recursively initialize and clone all submodules by using a default
pathspec of ".".  In order to construct more complex pathspecs,
--recurse-submodules can be given multiple times.

This also configures the 'submodule.active' configuration option to be
the given pathspec, such that any future invocation of `git submodule
update` will keep up with the pathspec.

Additionally the switch '--recurse' is removed from the Documentation as
well as marked hidden in the options array, to streamline the options
for submodules.  A simple '--recurse' doesn't convey what is being
recursed, e.g. it could mean directories or trees (c.f. ls-tree) In a
lot of other commands we already have '--recurse-submodules' to mean
recursing into submodules, so advertise this spelling here as the
genuine option.

Signed-off-by: Brandon Williams &lt;bmwill@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
