From e5387e5c451a2c1e3a55212aa5bfc017b67dd3ae Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Tue, 20 Mar 2012 14:11:03 -0400 Subject: [PATCH] Add spell.sh example to Git filtering notes. --- posts/Git/notes.org | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/posts/Git/notes.org b/posts/Git/notes.org index ab5a547..5c6da8c 100644 --- a/posts/Git/notes.org +++ b/posts/Git/notes.org @@ -498,7 +498,14 @@ Create a filtered version of =REPO_A=: : $ git filter-branch --prune-empty --index-filter "$SPELL" -- --all Alter the =grep= stuff as you need. The goal is to remove anything -you want to keep from the listing produced by =SPELL=. +you want to keep from the listing produced by =SPELL=. If the spell +becomes too complicated, you can move it to a standalone script: + + : $ cat /tmp/spell.sh + : #!/bin/bash + : git ls-tree -r … + : … + : $ git filter-branch --prune-empty --index-filter /tmp/spell.sh -- --all Merge it into =REPO_B=: -- 2.26.2