From: W. Trevor King Date: Tue, 20 Mar 2012 18:11:03 +0000 (-0400) Subject: Add spell.sh example to Git filtering notes. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e5387e5c451a2c1e3a55212aa5bfc017b67dd3ae;p=blog.git Add spell.sh example to Git filtering notes. --- 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=: