1

I have a git repo which has many folders and I have separate subdomains for them.

For example I have:

repo
├── folder1
├── folder2
└── folder3

Now folder1, folder2 and folder3 are subfolders but I have separate subdomains for them like.

Content inside folder1 will need to go to folder1.domain.com and same is the case with other folders.

Is there anyway in git I can clone these subfolders in their subdomains and then able to pull whenever I change anything in actual repo.

Note: I want this on server.

Here is another stackoverflow question

Hugo y
  • 1,421
  • 10
  • 20
Muhammad Umair
  • 631
  • 1
  • 8
  • 19

2 Answers2

0

I am not aware of server to server cloning . As it's 1 time operation why don't you upload from client to sever . Clone entire repository in local. Now seperate it in 3 folders as par your need and push onto separate severs.

SauriBabu
  • 414
  • 6
  • 15
0
  1. You can't use|reference subdir inside Git-repo as usual URL
  2. You can't split monorepo into set of nested repos inside wrapper-repo on server
  3. You can't clone part of Git-repo into new repo (except case there special conditions are met)

Resume

You must to read a lot more Git-docs in order (client-side):

  • split current repo into the set of linked repos
  • add appropriate remotes
  • use Git subtree (not git submodules) for management of new collection (staring points one and two for dive into subtrees may help)
Lazy Badger
  • 94,711
  • 9
  • 78
  • 110