I\'m using
git filter-branch --subdirectory-filter dir/name -- --all
to build a repo that only has history relating to that dir/name. Befo
filter-branch also keeps backup refs in .git/refs/original, which you'll also have to remove before gc'ing