I'm splitting out a Git repository using the --subdirectory-filter option of filter-branch which is working great except it pulls everything up to the root of the repository.
I currently have
ABC - DEF - GHI - JKL - MNO And the result of this command:
git filter-branch -f --subdirectory-filter ABC/DEF --prune-empty -- --all Generates this:
GHI JKL Where what I really want is this:
ABC - DEF - GHI - JKL I can't see anything in the Git docs that shows a filter option which preserves (or sets) the directory structure and I haven't been able to find a command I can run after the filtering to remap the structure to how I want it.
Is this possible?