0

I am currently examining git submodules, one part of my question can be solved with it. As I've understood submodules do synch a whole remote repo with a directory in my current repo (maybe I'm wrong).

What I would like to achieve would be to keep only certain folders in different repositories in synch, an Example:

REPO X -> folder A -> subfolder "contract" should be in sync with
REPO Y -> folder B -> subfolder "s1" -> subfolder "contract"

Is that possible with submodules? If not, is there another way?

  • When you say 2 folders each from different repos should be in sync, you mean they should be in sync with a common remote repo ? – Saurabh P Bhandari Apr 20 '20 at 12:55
  • there is currently no common repo –  Apr 20 '20 at 13:14
  • Does this answer your question? [Add subdirectory of remote repo with git-subtree](https://stackoverflow.com/questions/23937436/add-subdirectory-of-remote-repo-with-git-subtree) , In your case, you can assume Repo Y as remote repo and remote repo's URL will just be the absolute path of RepoY – Saurabh P Bhandari Apr 20 '20 at 13:37
  • Yes, it has helped, thank you! –  Apr 21 '20 at 08:06

0 Answers0