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>
Jacob Helwig committed
Feb 12, 2009 at 10:01 UTC
49bde7533681f5e4a80402af465bd7a28556266e
1 file changed
+5
Documentation/git-filter-branch.txt
+5
@@ -212,6 +212,11 @@ git filter-branch --index-filter 'git rm --cached filename' HEAD
212
213
Now, you will get the rewritten history saved in HEAD.
214
215
+As with using `rm filename`, `git rm --cached filename` will fail
216
+if the file is absent from the tree of a commit. If it is not important
217
+whether the file is already absent from the tree, you can use
218
+`git rm --cached --ignore-unmatch filename` instead.
219
+
220
To rewrite the repository to look as if `foodir/` had been its project
221
root, and discard all other history:
222