How to use git when project files are on different drives?

I am new to Git, and am trying to figure out how use a git repository when a project’s files are spread across different drives.

For example: The project requires html files on one drive. The CSS and JavaScript files are stored on a different drive. I don’t have the option to keep them together.

Is there a good way to store these files together in the same Git repository, and only grab the specific files you need in each drive? It makes sense to store the files together in the repository, as they are all for the same project.

The only solution I can come up with is to make multiple repositories for each project, one for the files on each drive.

4

I would stay away from using the execution/deployment directory as the primary factor for deciding how many repositories to create. That is a build and deployment question. You could change that architecture without having to make significant code changes and then your repository organization doesn’t make sense.

I would create repositories based on the composition of the components in your application/website/service/*. For example, one for front end/UI, one for services/middle tier, one for database and one for library or common code. These also map more closely to deployable units which I have found to be a nice organization.

Trả lời

Email của bạn sẽ không được hiển thị công khai. Các trường bắt buộc được đánh dấu *