jesloper
4/16/2019 - 11:54 AM

Filter repo to a set of directories

Filter repo to a set of directories

git filter-branch \
    --tree-filter 'find . ! \( -path "./Dir1*" -o \
                               -path "./Di32*" -o \
                               -path "./.git*" -o \
                               -path "." \) \
                        -prune \
                        -exec rm -fr {} +' \
    --prune-empty \
    HEAD