Skip to content

Commit 9cfde9e

Browse files
Stephen P. Smithgitster
authored andcommitted
user-manual: add section documenting shallow clones
Signed-off-by: Stephen P. Smith <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent bac5874 commit 9cfde9e

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

Documentation/user-manual.txt

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2128,6 +2128,26 @@ The gitweb cgi script provides users an easy way to browse your
21282128
project's files and history without having to install Git; see the file
21292129
gitweb/INSTALL in the Git source tree for instructions on setting it up.
21302130

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+
21312151
[[sharing-development-examples]]
21322152
Examples
21332153
--------
@@ -4642,9 +4662,6 @@ standard end-of-chapter section?
46424662

46434663
Include cross-references to the glossary, where appropriate.
46444664

4645-
Document shallow clones? See draft 1.5.0 release notes for some
4646-
documentation.
4647-
46484665
Add a section on working with other version control systems, including
46494666
CVS, Subversion, and just imports of series of release tarballs.
46504667

0 commit comments

Comments
 (0)