Why Everyone Hates Git Submodules
Git Git Submodules Vs Git Subtree When switching from a branch with a submodule to another without that submodule, git will just leave the files on disk and they will become untracked files. you have to manually delete them. I recently started playing around with git subtrees for my homelab config migration to git, and while they definitely have their own ergonomics issues, the fact that they vendor the subtree’s data in the parent makes dealing with them in ci cd scenarios much easier.
Git Submodules Avirup Ghosh Git submodules are powerful, but tricky to use. book a workshop with me here: more. The biggest reason i find git submodules painful: a "commitlink" object in a git tree does not count as a reference to that commit or anything that commit references, for the purposes of garbage collecting the repository or pushing and pulling changes. Problem we're faced at work with conflicting view points regarding the use of submodules for reusable code in our embedded projects. some of the developers argue that they complexify the workflow and that existing projects like the linux kernel doesn't use them at all since it is a single, flat repository, and we should take their example. In this article, we’ll break down what submodules actually are, when they make sense, and how monorepos can keep everything under one roof without extra git tricks.
Git Submodules Faq Sa Problem we're faced at work with conflicting view points regarding the use of submodules for reusable code in our embedded projects. some of the developers argue that they complexify the workflow and that existing projects like the linux kernel doesn't use them at all since it is a single, flat repository, and we should take their example. In this article, we’ll break down what submodules actually are, when they make sense, and how monorepos can keep everything under one roof without extra git tricks. Git submodules are awful but occasionally necessary. one of the beautiful things about powerful tools is that they enable you to do easy things easily but also more complicated things as well. git is the perfect example of this. On many places i read that git submodules are bad and usually should be avoided. i for a longer time was looking for a practical solution to develop some shared modules while actually using them in concrete projects. There is a specific kind of silence that falls over a zoom call when someone realizes they just pushed a parent repository but forgot to push the changes inside the submodule. it’s a mixture of frustration and "not again" that every developer who has touched git submodules knows by heart. Until there are submodule changes, the build has (hopefully) failed and you are complaining to your colleagues. only then does it occur to you that maybe it's the submodule that needs updating.
Comments are closed.