Skip to contentSkip to conversation

git-filter-branch: Clarify file removal example.

PATCH New Jon Loeliger 1 participant 1 message Jun 15, 2016 Documentation

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 git-filter-branch: Clarify file removal example.

---
 Documentation/git-filter-branch.txt |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
Documentation/git-filter-branch.txt +4 -0
index 8d80f0d..506c37a 100644
@@ -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:
 
 --------------------------------------------------------------------------
Signature · 1 line
1.5.5.1.147.g867f