This is due the fact, that Git receives following data from the superproject: The -recursive option means, that Git will walk through nested submodules as well (not obligatory in this example).Īfter the initialization the submodule's repository will be in detached HEAD state. The new main repositories will automatically know about the new extension, but it won't be initialized, which means that the submodule's directory will be empty in the beginning.įor initializing the submodule, the developer needs to execute git submodule update -init -recursive. Remotes/origin/master 89d9eae Initial commit Submodule 'mod/mylittleextension' (/local/repositories/mle) registered for path 'mod/mylittleextension' Now a developer has to type in the following commands, in order to clone the superproject (maybe from a remote device). $ git commit -a -m "New module MLE installed" $ git submodule add /local/repositories/mle/ mod/mylittleextension Note: Ensure that you've understood the how-to at Installing and maintaining contributed extensions using Git submodules before continuing.Īssume the plugin mod_mylittleextension (remember: MLE is a fake plugin) was installed in the superproject and these changes have been committed: There are some things in Git submodules, which aren't obvious and can be quite surprising. 3.5 Figure: Workflow of an update of your submodulesįirst a short explanation of events which are triggered, when a superproject is cloned.2.2 Figure: Updates without customization.2 Upgrading your submodules via the superproject.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |