user-manual: add section documenting shallow clones

Signed-off-by: Stephen P. Smith <ischis2@cox.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Stephen P. Smith committed Dec 29, 2015 at 17:03 UTC 9cfde9ee8f6dc82365f1e977935960f34108076b
1 file changed +20 -3
Documentation/user-manual.txt
+20 -3
@@ -2128,6 +2128,26 @@ The gitweb cgi script provides users an easy way to browse your
2128 project's files and history without having to install Git; see the file
2129 gitweb/INSTALL in the Git source tree for instructions on setting it up.
2130
2131 +[[how-to-get-a-git-repository-with-minimal-history]]
2132 +How to get a Git repository with minimal history
2133 +------------------------------------------------
2134 +
2135 +A <<def_shallow_clone,shallow clone>>, with its truncated
2136 +history, is useful when one is interested only in recent history
2137 +of a project and getting full history from the upstream is
2138 +expensive.
2139 +
2140 +A <<def_shallow_clone,shallow clone>> is created by specifying
2141 +the linkgit:git-clone[1] `--depth` switch. The depth can later be
2142 +changed with the linkgit:git-fetch[1] `--depth` switch, or full
2143 +history restored with `--unshallow`.
2144 +
2145 +Merging inside a <<def_shallow_clone,shallow clone>> will work as long
2146 +as a merge base is in the recent history.
2147 +Otherwise, it will be like merging unrelated histories and may
2148 +have to result in huge conflicts. This limitation may make such
2149 +a repository unsuitable to be used in merge based workflows.
2150 +
2151 [[sharing-development-examples]]
2152 Examples
2153 --------
@@ -4642,9 +4662,6 @@ standard end-of-chapter section?
4662
4663 Include cross-references to the glossary, where appropriate.
4664
4645 -Document shallow clones? See draft 1.5.0 release notes for some
4646 -documentation.
4647 -
4665 Add a section on working with other version control systems, including
4666 CVS, Subversion, and just imports of series of release tarballs.
4667