threads / patch / 13548

patchgit-filter-branch: Clarify file removal example.

Subject: [PATCH] git-filter-branch: Clarify file removal example.

## tl;dr

One message between May 16, 2008 and May 16, 2008. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Jon Loeliger· May 16, 2008, 19:43 UTC · lore
Signed-off-by: Jon Loeliger <jdl@jdl.com>
---
 Documentation/git-filter-branch.txt |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
Show changes to Documentation/git-filter-branch.txt +4 −0
diff --git a/Documentation/git-filter-branch.txt b/Documentation/git-filter-branch.txt
index 8d80f0d..506c37a 100644
--- a/Documentation/git-filter-branch.txt
+++ b/Documentation/git-filter-branch.txt
@@ -183,6 +183,10 @@ or copyright violation) from all commits:
 git filter-branch --tree-filter 'rm filename' HEAD
 -------------------------------------------------------
 
+However, if the file is absent from the tree of some commit,
+a simple `rm filename` will fail for that tree and commit.
+Thus you may instead want to use `rm -f filename` as the script.
+
 A significantly faster version:
 
 --------------------------------------------------------------------------
-- 
1.5.5.1.147.g867f

← back to recent threads