How to use GIT when I have several files shared between several projects

I have several projects that contain many shared files. My question is how to organize the structure of these projects in GIT. I came from MKS and PVCS, which are the version control system for each file. I read about GIT submodules, but I don't know if they are a solution. What bothers me the most is the linking of files to projects: for example, if I find an error in one project file and this file is used in other 2 projects, I have to manually replace the file in the other 2 GIT repos. How can I do this in an efficient way?

+7
source share
1 answer

Yes, you can use the "submodule" for this purpose.

To handle more complex things, you can use the subtree extension:

https://github.com/apenwarr/git-subtree

+3
source

All Articles