From f4bf2184ae8b79f95b9f56c1ea5455d04e559299 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Mon, 1 Jan 2007 15:08:06 -0800 Subject: [PATCH] Update clone/fetch documentation with --depth (shallow clone) option Signed-off-by: Junio C Hamano --- Documentation/fetch-options.txt | 5 +++++ Documentation/git-clone.txt | 12 +++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/Documentation/fetch-options.txt b/Documentation/fetch-options.txt index 39bf77fbef..5b4d184a73 100644 --- a/Documentation/fetch-options.txt +++ b/Documentation/fetch-options.txt @@ -41,3 +41,8 @@ implementing your own Porcelain you are not supposed to use it. +\--depth=:: + Deepen the history of a 'shallow' repository created by + `git clone` with `--depth=` option (see gitlink:git-clone[1]) + by the specified number of commits. + diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt index 96523204dd..e7085fdf5f 100644 --- a/Documentation/git-clone.txt +++ b/Documentation/git-clone.txt @@ -11,7 +11,7 @@ SYNOPSIS [verse] 'git-clone' [--template=] [-l [-s]] [-q] [-n] [--bare] [-o ] [-u ] [--reference ] - [] + [--depth=] [] DESCRIPTION ----------- @@ -31,6 +31,7 @@ the remote branch heads under `$GIT_DIR/refs/remotes/origin` and by initializing `remote.origin.url` and `remote.origin.fetch` configuration variables. + OPTIONS ------- --local:: @@ -95,6 +96,15 @@ OPTIONS if unset the templates are taken from the installation defined default, typically `/usr/share/git-core/templates`. +--depth=:: + Create a 'shallow' clone with a history truncated to the + specified number of revs. A shallow repository has + number of limitations (you cannot clone or fetch from + it, nor push from nor into it), but is adequate if you + want to only look at near the tip of a large project + with a long history, and would want to send in a fixes + as patches. + :: The (possibly remote) repository to clone from. It can be any URL git-fetch supports.