Submodule, but rather from a cloned version somewhere else, but theĬonvenience of just making small changes directly so you can seeĭepending on submodules creates external dependencies. One could argue that you’re not supposed to work from inside a Of these, you will break the build for everyone but yourself. Then you need to commit and push the parent repo, otherwise the refįor the submodule will not be updated. You first need to pull, checkout an actual branch, and then push. “detached HEAD” state, so if you then want to push your changes, Submodule and commit them, but your submodule is always in a The “fix” is then to git submodule update -init -recursiveĪgain, and to manually remove the files at the previous entrypoint. When a commit moves a git submodule from one place to another, theĮxisting submodule will stay, now as a collection of untrackedįiles, and in the new location there’s an uninitialized entrypoint. Move your submodule to a different part of the tree, and this is While it’s notĮxactly the most common thing to do, occasionally you do want to Moving submodules requires manual intervention. Will have to check out these commits yourself. In order to check what changes are actually in this commit, you Simply show up as a SHA1 hash of the new commit that will be checked Submodules cannot easily be reviewed in changesets. Ways, especially for newcomers to your software. This isĪn easy thing to mess up which will break your build in mysterious Where the submodules were updated, you need to do it again. Submodules introduce additional steps in checking out the code.Īfter checking out the repository, one still needs to (possibly Personal experience, they are not the nicest thing to work with: It is possible to use the existing methods of pulling and checking out This to include external tools into your own repo (vendoring) or to ease While allowing the external code to exist independently. Git submodules allow you to add other code into your own repository, The shortcomingsīefore we start looking at the potential solution, let’s first quicklyĮxamine the problem. Supposed to make our lives easier when working with git submodules. In this blog post we’re going to look at two tools that are However, submodules are not without their problems and nicer Than not, vendoring things using git submodules is the easiest solution At summitto we get to enjoy dependency management in C++ and more often
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |