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

[PATCH] Documentation/git-filter-branch: Remove Useless Use of Plumbing

From
Petr Baudis <pasky@suse.cz>
Date
Jul 22, 2008, 22:24 UTC
Message-ID
<20080722222418.15372.62190.stgit@localhost>
The example to remove file using index-filter uses git update-index
 --remove where git rm --cached works as well.
Signed-off-by: Petr Baudis <pasky@suse.cz>
---
 Documentation/git-filter-branch.txt |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Documentation/git-filter-branch.txt b/Documentation/git-filter-branch.txt
index a3edc00..7ba9dab 100644
--- a/Documentation/git-filter-branch.txt
+++ b/Documentation/git-filter-branch.txt
@@ -191,7 +191,7 @@ Thus you may instead want to use `rm -f filename` as the script.
 A significantly faster version:
 
 --------------------------------------------------------------------------
-git filter-branch --index-filter 'git update-index --remove filename' HEAD
+git filter-branch --index-filter 'git rm --cached filename' HEAD
 --------------------------------------------------------------------------
 
 Now, you will get the rewritten history saved in HEAD.
Next: Junio C Hamano
Message 1 of 3 in “Documentation/git-filter-branch: Remove Useless Use of Plumbing”
  1. Documentation/git-filter-branch: Remove Useless Use of PlumbingPetr Baudis, Jul 22, 2008
  2. Junio C HamanoJul 23, 2008
  3. Petr BaudisJul 23, 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.