G
G
Governor2021-11-17 20:29:17
git
Governor, 2021-11-17 20:29:17

How to store separate files in git?

For each service, I use a separate repository.
Often in projects using multiple services, it is necessary to use the same module (file).
For example, a logging utility or a wrapper for calling web-API methods.
The problem is that there can be 20 services, and each has the same utility, and when you need to update this utility, you have to update it manually in all services.
And it may also happen that one person will correct the utility in service 5, the second in service 7, the third in service 12, and then it is difficult to track and merge these changes.

Question: is it possible to solve the problem in git (or other wells) most conveniently? Is it possible to create a repository for a single file and update it separately without deleting the main service repository?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Aetae, 2021-11-17
@Aetae

git submodules
However, depending on your language, it would be more correct to pack such a module as a library \ package and connect it through the appropriate package manager.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question