I have a project with a structure like this:
src/
scripts/
db/
other_stuff/
even_more_stuff/
file1
file2
file3
This repository needs to be split up. db and scripts need to be split out into their own repositories, and I know that this can be easily done with git filter-branch --subdirectory-filter ...
I also need to create a new main repository based on the current structure (including history), but excluding anything that is already split to its own repo OR any files on a specific list of files to exclude: file1, file3, even_more_stuff. Is there a way to use git filter-branch to filter out files by specific names?
The resulting main repo should simply be:
src/
other_stuff/
file2
One catch to this is I'm not supposed to make any changes to the original repository so I can't just delete file, file3, etc... and then copy the remainder to a new repository.