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

[PATCH V2 2/2] user-manual: add section documenting shallow clones

From
SSStephen P. Smith <ischis2@cox.net>
Date
Dec 22, 2015, 18:40 UTC
Message-ID
<1450809623-1502-1-git-send-email-ischis2@cox.net>
In-Reply-To
<CAPig+cQOAGzQMj5oNMEsD0u7Wqj80kyyYcOwi-Y0q1yHtX4s4A@mail.gmail.com>
Rather than merely pointing readers at the 1.5 release notes to
learn about shallow clones, document them formally.
---
 Documentation/user-manual.txt | 21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)
diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index 1c790ac..bdfe984 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -2128,6 +2128,24 @@ The gitweb cgi script provides users an easy way to browse your
 project's files and history without having to install Git; see the file
 gitweb/INSTALL in the Git source tree for instructions on setting it up.
 
+[[how-to-get-a-git-repository-with-minimal-history]]
+How to get a Git repository with minimal history
+------------------------------------------------
+
+A <<def_shallow_clone,shallow clone>> is useful when the recent
+history of a project is needed and getting real history recorded in
+the upstream is expensive. The resultant cloned <<def_repository,repository>>
+has truncated history. This clone could be used to look at history
+near the tip of a branch and contribute email patches to the project.
+
+A <<def_shallow_clone,shallow clone>> is created by specifying the
+depth when creating a clone of a repository using the
+linkgit:git-clone[1] `--depth` switch.  The depth can later be changed
+by using the linkgit:git-fetch[1] `--depth` switch.  If there is later
+a need to fetch the entire history and if the source repository is
+complete, the linkgit:git-fetch[1] `--unshallow` switch can be used to
+convert a shallow repository to a complete one.
+
 [[sharing-development-examples]]
 Examples
 --------
@@ -4645,9 +4663,6 @@ standard end-of-chapter section?
 
 Include cross-references to the glossary, where appropriate.
 
-Document shallow clones?  See draft 1.5.0 release notes for some
-documentation.
-
 Add a section on working with other version control systems, including
 CVS, Subversion, and just imports of series of release tarballs.
 
-- 
2.6.3.368.gf34be46
Previous: Eric SunshineNext: Stephen & Linda Smith
Message 4 of 22 in “Define the term shallow clone.”
  1. 1/2 Define the term shallow clone.Stephen P. Smith, Dec 22, 2015
  2. 2/2 Add a section to the users manual documenting shallow clones.Stephen P. Smith, Dec 22, 2015
  3. Eric SunshineDec 22, 2015
  4. 2/2 user-manual: add section documenting shallow clonesStephen P. Smith, Dec 22, 2015
  5. Stephen & Linda SmithDec 23, 2015
  6. 2/2 user-manual: add section documenting shallow clonesStephen P. Smith, Dec 23, 2015
  7. Eric SunshineDec 23, 2015
  8. 2/2 user-manual: add section documenting shallow clonesStephen P. Smith, Dec 23, 2015
  9. Junio C HamanoDec 28, 2015
  10. 1/2 glossary: define the term shallow cloneStephen P. Smith, Dec 29, 2015
  11. 2/2 user-manual: add section documenting shallow clonesStephen P. Smith, Dec 29, 2015
  12. Junio C HamanoDec 29, 2015
  13. Stephen & Linda SmithDec 29, 2015
  14. Junio C HamanoDec 29, 2015
  15. 2/2 user-manual: add section documenting shallow clonesStephen P. Smith, Dec 29, 2015
  16. Junio C HamanoDec 29, 2015
  17. 2/2 user-manual: add section documenting shallow clonesStephen P. Smith, Dec 30, 2015
  18. Stephen & Linda SmithDec 29, 2015
  19. Stephen & Linda SmithDec 22, 2015
  20. Eric SunshineDec 22, 2015
  21. 1/2 glossary: define the term shallow cloneStephen P. Smith, Dec 22, 2015
  22. 1/2 glossary: define the term shallow cloneStephen P. Smith, Dec 23, 2015

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.