I have extracted a tools folder to it's own repo using:
git-filter-repo --subdirectory-filter path/to/tools
In parallel, new commits are being made in the original repo.
I would like to be able to periodically merge the changes into my filtered repo. The only thing I can think is to clone the original repo again (with the changes), apply the subdirectory-filter on it again, add it as a remote to my repo, then cherry-pick/merge the branch from there. It is a lot to perform every time there is a small change. I think there's probably a smart way to create a filtered patch from the main repo and then apply it to the filtered, but my git-skills are not sufficient.
Can someone come up with a better way to do it?
Since git filter-repo will recreate the exact same commits if you run it twice on the exact same history (you confirmed it by testing), you can simply use git merge to integrate the new commits, which will appear as descendants of the previous extracted commit.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With