Let's say, I have project/repository folder (with it sub folders/files), example structure:
MyProject
- Folder_1
-- file_A
-- file_B
- Folder_2
-- file_C
-- file_D
I have two needs:
MyProject
- Folder_1
-- file_A
- Folder_2
-- file_D
Folder_2
to another repository. Is that possible that a folder were linked to multiple repos?However, on my Windows (I use TortoiseGit
), I am unable to achieve "multi-linked" repos idea.
No need for "another repository"
You can simply make a branch in the same repo, where you remove any elements you don't want, in order to leave only:
- Folder_1
-- file_A
- Folder_2
-- file_Deave only
Your developer can work in that branch of the same repository. See "TortoiseGit Manual / Branching/Tagging"
TortoiseGit → Create Branch...
that I could link Folder_2 to another repository.
Then you can delete Folder_2
(in that branch made for your developer), and declare your remote repo as a submodule under the path Folder2.
See TortoiseGit submodules.