From: Siraaj Khandkar Date: Fri, 9 Jun 2023 20:27:25 +0000 (-0400) Subject: Add the --force flag to second filter-branch run X-Git-Url: https://git.xandkar.net/?p=git-cheat-sheet.git;a=commitdiff_plain Add the --force flag to second filter-branch run since it will already have the backup by then. --- diff --git a/README.md b/README.md index 280c99e..86f8e41 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,7 @@ $ git log --pretty=format: --name-status \ | sort -u > /tmp/tree.old $ git ls-tree -r --name-only HEAD > /tmp/tree.new $ git filter-branch \ + --force \ --prune-empty \ --index-filter ' grep -Fvxf /tmp/tree.new /tmp/tree.old \