How to make Git submodules easier for non-programmers?

Our small software store recently moved from Subversion to Git, as we programmers found Git better. Migration was not painless, there were problems with the function of submodules. My main problem is that when the repo contains submodules, you cannot just clone it and expect the work to work. You must take an extra step to initialize and load the submodules. Subsequent extrusions should automatically update the submodules , so this is OK. But when I add a new submodule, press commit and people pull, they do not receive the new submodule automatically, they must again git submodule update manually.

This is stupid, because people cannot just pull out the repo using submodules and expect it to be built. Is this understanding correct? Programmers can simply write a script or an alias to update submodules after receiving new commits, but for our non-programmers, submodules are a pain. Id would like to come up with a solution that will make the repo always work right after cloning / pulling, regardless of the Git client used.

What are my options?

+6
source share
2 answers

Currently, submodule support is much better, which makes the problem almost nonexistent.

  • GitBox received good support for submodules.

  • SourceTree by Atlassian is a free Git client that has added submodule support in 1.3. a slight glitch in the processing of submodules in 1.3.1, but otherwise the client seems to cover all the cases of using the submodule that I wanted - it makes the submodules practically transparent to non-programmers.

  • Git Tower also seems to support submodules very well since 1.4.

-1
source

I would highly recommend git-slave if you plan to use many submodules, especially if you are going to reference "shared libraries". Although, bare-bones sub-modules are not so difficult to get up to speed, if you concentrate for several hours with some experiments to get through a bunch of scenarios.

I would also highly recommend the CI server for building assemblies for you. He will capture all the necessary submodules. You can make all the artifacts (you decide you want them to be) available through a downloadable zip file. I use TeamCity and this is a great way to expose everything without requiring the use of any VCS.

0
source

Source: https://habr.com/ru/post/902035/


All Articles