Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Add 'rm -f' equivalent to 'git rm' example of filter-branch --index-filter
author
Jacob Helwig
<jacob.helwig@gmail.com>
Thu, 12 Feb 2009 18:01:10 +0000
(10:01 -0800)
committer
Junio C Hamano
<gitster@pobox.com>
Thu, 12 Feb 2009 23:44:56 +0000
(15:44 -0800)
Signed-off-by: Jacob Helwig <jacob.helwig@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-filter-branch.txt
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
222b167
)
diff --git
a/Documentation/git-filter-branch.txt
b/Documentation/git-filter-branch.txt
index 451950bab67702a236c55e77d6f3a0723a812488..1fbbbb4025d7fe3713b3b83dfb7bf4ad3f527055 100644
(file)
--- 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: