Answer the question
In order to leave comments, you need to log in
GIT working copy with two sources - how to resolve?
As a version control system, I used all my adult life (as I started using it, that's how it started :) ) Subversion (aka SVN). Then a project turned up using a framework that is hosted on github, but I have never worked with git. The customer asks to host the project on github too and is even ready to constantly pay for it. On SVN, I can’t immediately find the best deployment option, but here is a completely unfamiliar system, but I need to quickly. But this is a prelude.
Actually, the question is, how to correctly implement the situation when one directory (framework) is hosted in one repository entirely, except for one subdirectory (application), which is hosted in another repository. Need to:
a) in the status of the framework (the root directory of the project), the files of the application (subdirectory) did not flicker, and the framework normally checked out from its repository (the .gitignore file is present there at the root and should also be updated normally, that is, simply adding the application to it will not work) ;
b) in the status of the application flashed :) its files relative to the application repository, ideally, so that the application repository contains a fully deployed framework with the application inside, but not as an external link, but as a snapshot of the project at the time of the commit
So far, it only comes to mind to deploy the framework; copy everything except git information into a parallel tree; expand the application there. After updating the framework by checkout, delete the old one from the copy (a simple overwrite will not work, files from the framework can disappear or be renamed), leaving only the application; copy new on top over the application; modify the application to the realities of the new version and commit it to the application repository. But somehow I don't like this method, it's very ugly. Maybe there are better options?
Answer the question
In order to leave comments, you need to log in
use git modules (:
www.kernel.org/pub/software/scm/git/docs/gitmodules.html
If someone gets here from the search, then here is a detailed description
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question