![]() ![]() This means we can use a submodule that we don't control. So that's "just as good" as a tag: we've simply stored the hash ID in a commit in the superproject, rather than storing it in a tag name in the submodule. Using the hash provided by the superproject. The superproject Git then does: git -C path/to/submodule checkout The superproject commit-the one actually checked out right now, in the superproject-lists the raw commit hash ID for each submodule. ![]() It's the superproject Git that says which commit to use. The point of submodules, as far as Git is concerned, is to be in detached HEAD mode. Any time you use a tag, you could just resolve the tag to the right commit hash ID, and then use the hash ID directly. Note that a tag name is just a human-readable name for one specific commit. Submodules never "point to tags" (that's not possible in general, as you've discovered: checking out a tag name just results in a detached HEAD). How can I be sure the submodules will be cloned at the desired tag? git/module/sub_module_path/config files and see nothing in here as well. gitmodule file hoping to see a "tag" value but nothing. So, how can I verify that when a coworker clones this project, it will pulls the submodules at the state referred to by the release tag I have hopefully set? I tried looking in the. However, I then git added all submodules and committed to my local repo but have not yet pushed because I'm not actually sure the submodules are pointing the the desired tags. This seemed to work fine but when I ran git status, it complained about having a detached head (I suppose this is expected since I checked out the tag on the branch and not the actual branch itself). Then I followed these instructions, going into each submodule, checking out the respective release tag in each. ![]() gitmodule file and update the remote url and branch I even executed the comment that said I need to git submodule update -init -recursive -remote from the root level directory. One of the modules also needed to have the remote URL changed so I followed these instructions to modify the. Now I would like to convert all the modules to point from the develop branch to a specific release tag on the master branch. Since we were testing before, the submodules were simply referring to the develop branch. We're trying to convert a project we're working on to use submodules. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |