[PATCH v3 3/4] gitfaq: shallow cloning a repository

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add issue in 'Common issue' section which covers issues with cloning
large repositories. Use shallow cloning to clone the repository in
a smaller size.

Signed-off-by: Shourya Shukla <shouryashukla.oo@xxxxxxxxx>
---
 Documentation/gitfaq.txt | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/Documentation/gitfaq.txt b/Documentation/gitfaq.txt
index 13d37f96af..cea293cf07 100644
--- a/Documentation/gitfaq.txt
+++ b/Documentation/gitfaq.txt
@@ -275,6 +275,20 @@ I want to change the remote of my repository. How do I do that?::
 One can list the remotes of a repository using `git remote -v` command.
 The default name of a remote is 'origin'.
 
+[[shallow-cloning]]
+The repository I am trying to clone is too big. Is there an alternative
+way of cloning it in lesser space?::
+	One can clone a repository having a truncated history, meaning the
+	history	will span upto a specified number of commits instead of
+	the whole history of the repository. This is called 'Shallow Cloning'.
+	This helps to decrease the space taken up by the repository.
+	Shallow cloning can be done by using the `--depth` option
+	while cloning. Therefore, the command would look like:
+	`git clone --depth <n> <url>`.
+	Here, 'n' is the depth of the clone. For e.g., a depth of 1
+	would mean fetching only the top level commits of the repository
+	See linkgit:git-clone[1].
+
 Hooks
 -----
 
-- 
2.20.1




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux