Skip to content

Commit ce555f3

Browse files
committed
Merge branch 'jc/doc-gc-prune-now' into maint
"git gc" is safe to run anytime only because it has the built-in grace period to protect young objects. In order to run with no grace period, the user must make sure that the repository is quiescent. * jc/doc-gc-prune-now: Documentation/gc: warn against --prune=<now>
2 parents 44a9b53 + fae1a90 commit ce555f3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Documentation/git-gc.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,11 @@ automatic consolidation of packs.
6363
--prune=<date>::
6464
Prune loose objects older than date (default is 2 weeks ago,
6565
overridable by the config variable `gc.pruneExpire`).
66-
--prune=all prunes loose objects regardless of their age.
67-
--prune is on by default.
66+
--prune=all prunes loose objects regardless of their age (do
67+
not use --prune=all unless you know exactly what you are doing.
68+
Unless the repository is quiescent, you will lose newly created
69+
objects that haven't been anchored with the refs and end up
70+
corrupting your repository). --prune is on by default.
6871

6972
--no-prune::
7073
Do not prune any loose objects.

0 commit comments

Comments
 (0)