Skip to content

Commit

Permalink
Add 'rm -f' equivalent to 'git rm' example of filter-branch --index-f…
Browse files Browse the repository at this point in the history
…ilter

Signed-off-by: Jacob Helwig <jacob.helwig@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Jacob Helwig authored and Junio C Hamano committed Feb 12, 2009
1 parent 222b167 commit 49bde75
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Documentation/git-filter-branch.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down

0 comments on commit 49bde75

Please sign in to comment.