# [PATCH] git-filter-branch.txt: (Checklist for Shrinking): Adjust commands and options

1 messages from 2010-12-05 to 2010-12-05. Participants: jari.aalto@cante.net.
Thread: https://gitlist.dev/t/25972

## jari.aalto@cante.net, 2010-12-05 19:14

Subject: [PATCH] git-filter-branch.txt: (Checklist for Shrinking): Adjust commands and options
Message-ID: <1291576487-12120-1-git-send-email-jari.aalto@cante.net>
URL: https://gitlist.dev/e/1291576487-12120-1-git-send-email-jari.aalto%40cante.net

```
From: Jari Aalto <jari.aalto@cante.net>

Add a little more explanation to bullet that talks about cryptic
--tag-name-filter options. Suggest also option --expire-unreachable=0 in
"git reflog" call. Add option --aggressive to garbage collect call.

Signed-off-by: Jari Aalto <jari.aalto@cante.net>
---
 Documentation/git-filter-branch.txt |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/Documentation/git-filter-branch.txt b/Documentation/git-filter-branch.txt
index 796e748..180fdaa 100644
--- a/Documentation/git-filter-branch.txt
+++ b/Documentation/git-filter-branch.txt
@@ -380,8 +380,10 @@ objects until you tell it to.  First make sure that:
   over its lifetime.  `git log \--name-only \--follow \--all \--
   filename` can help you find renames.
 
-* You really filtered all refs: use `\--tag-name-filter cat \--
-  \--all` when calling git-filter-branch.
+* You really filtered all refs. Without the following, you could have
+  some branches or tags still pointing to the commits before
+  filtering:
+  `\--tag-name-filter cat \-- \--all`
 
 Then there are two ways to get a smaller repository.  A safer way is
 to clone, that keeps your original intact.
@@ -399,12 +401,12 @@ warned.
   for-each-ref \--format="%(refname)" refs/original/ | xargs -n 1 git
   update-ref -d`.
 
-* Expire all reflogs with `git reflog expire \--expire=now \--all`.
-
-* Garbage collect all unreferenced objects with `git gc \--prune=now`
-  (or if your git-gc is not new enough to support arguments to
-  `\--prune`, use `git repack -ad; git prune` instead).
+* Expire all reflogs with `git reflog expire \--expire=now \--all
+  \--expire-unreachable=0`.
 
+* Garbage collect all unreferenced objects with `git gc \--aggressive
+  \--prune=now`. Or if your git-gc is not new enough to support
+  arguments to `\--prune`, use `git repack -ad; git prune` instead.
 
 Author
 ------
-- 
1.7.2.3

```
