Skip to content

Commit 28678b4

Browse files
Miklos Vajnagitster
authored andcommitted
git-clone -s: document problems with git gc --prune
There is a scenario when using git clone -s and git gc --prune togother is dangerous. Document this. Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 3b839fd commit 28678b4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Documentation/git-clone.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,14 @@ OPTIONS
6262
.git/objects/info/alternates to share the objects
6363
with the source repository. The resulting repository
6464
starts out without any object of its own.
65+
*NOTE*: this is a possibly dangerous operation; do *not* use
66+
it unless you understand what it does. If you clone your
67+
repository using this option, then delete branches in the
68+
source repository and then run linkgit:git-gc[1] using the
69+
'--prune' option in the source repository, it may remove
70+
objects which are referenced by the cloned repository.
71+
72+
6573

6674
--reference <repository>::
6775
If the reference repository is on the local machine

0 commit comments

Comments
 (0)