git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Jon Loeliger <jdl@jdl.com>
Date
May 16, 2008, 19:43 UTC
Message-ID
<E1Jx5qI-0005Ts-LT@jdl.com>
Signed-off-by: Jon Loeliger <jdl@jdl.com>
---
 Documentation/git-filter-branch.txt |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
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
Message 1 of 1 in “git-filter-branch: Clarify file removal example.”
  1. git-filter-branch: Clarify file removal example.Jon Loeliger, May 16, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.