summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorJacob Helwig <jacob.helwig@gmail.com>2009-02-12 10:01:10 -0800
committerJunio C Hamano <gitster@pobox.com>2009-02-12 15:44:56 -0800
commit49bde7533681f5e4a80402af465bd7a28556266e (patch)
tree40949c205960efd0f2ee723a9f68efdefe199284 /Documentation
parent222b1673860bba6c75895ce3e2d1467fb878fa2a (diff)
downloadgit-49bde7533681f5e4a80402af465bd7a28556266e.tar.gz
Add 'rm -f' equivalent to 'git rm' example of filter-branch --index-filter
Signed-off-by: Jacob Helwig <jacob.helwig@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/git-filter-branch.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/Documentation/git-filter-branch.txt b/Documentation/git-filter-branch.txt
index 451950bab6..1fbbbb4025 100644
--- a/Documentation/git-filter-branch.txt
+++ b/Documentation/git-filter-branch.txt
@@ -212,6 +212,11 @@ git filter-branch --index-filter 'git rm --cached filename' HEAD
Now, you will get the rewritten history saved in HEAD.
+As with using `rm filename`, `git rm --cached filename` will fail
+if the file is absent from the tree of a commit. If it is not important
+whether the file is already absent from the tree, you can use
+`git rm --cached --ignore-unmatch filename` instead.
+
To rewrite the repository to look as if `foodir/` had been its project
root, and discard all other history: