path: root/Documentation
diff options
authorJunio C Hamano <>2005-12-09 00:30:24 (GMT)
committerJunio C Hamano <>2005-12-09 00:30:24 (GMT)
commitc82365dc6f211722cbbed96f41a61f477914c91a (patch)
tree86a8dc2afea62f4ba5b207671652bb03391fe5b5 /Documentation
parent8c667f4bb878a7bcb45eb6dbd920b8aba9718d7e (diff)
Documentation: git-prune
Not replacing but always including our own refs may be more desirable (and unarguably much safer), but at the same time I have a suspicion that that might be forbidding a useful usage I haven't thought of, so... Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'Documentation')
1 files changed, 29 insertions, 1 deletions
diff --git a/Documentation/git-prune.txt b/Documentation/git-prune.txt
index 3367c9b..05c8d49 100644
--- a/Documentation/git-prune.txt
+++ b/Documentation/git-prune.txt
@@ -8,7 +8,7 @@ git-prune - Prunes all unreachable objects from the object database
-'git-prune' [-n]
+'git-prune' [-n] [--] [<head>...]
@@ -27,6 +27,34 @@ OPTIONS
Do not remove anything; just report what it would
+ Do not interpret any more arguments as options.
+ Instead of keeping objects
+ reachable from any of our references, keep objects
+ reachable from only listed <head>s.
+Note that the explicitly named <head>s are *not* appended to the
+default set of references, but they replace them. In general you
+would want to say `git prune $(git-rev-parse --all) extra1
+extra2` to keep chains of commits leading to extra1, extra2,
+... in addition to what are reachable from your own refs.
+Saying `git prune extra1 extra2` would *lose* objects reachable
+only from the usual refs, which is usually not what you want.
+To prune objects not used by your repository and another that
+borrows from your repository via its
+$ git prune $(git-rev-parse --all) \
+ $(cd ../another && $(git-rev-parse --all))