I'm currently working on a project where I need to integrate a specific subfolder (folder F) from a repository (RepoA) into another repository (RepoB). I tried using git subtree and submodules, but these methods add the entire repository rather than just the specific subfolder I'm interested in.
I've also considered using sparse checkout, but it requires a full clone first, which I want to avoid due to the size of RepoA. Additionally, sparse checkout does not automatically update to reflect changes in the remote repository; I would need to manually update the sparse-checkout configuration each time there are changes to folder F.
Is there a way to directly integrate or reference just a specific subfolder from one repository into another without cloning the entire repository? Any guidance on how to set this up, possibly using Git commands or any other tool that can achieve this, would be greatly appreciated.