![]() ![]() gitmodules file - the file should be located in the top-level directory. In the parent repository find & open the. 1 -b git submodule add -b master URL to Git repo 2.gitmodules DbConnector stable git config -f. then commit and push your changes to wagtail-4-upgrade. Make your code changes: fix imports, tests, etc. ![]() Since we will use a Wagtail upgrade as an example, let’s call the branch wagtail-4-upgrade. Merge the commit recorded in the superproject into the current branch of the submodule. Thus, the other applications remain unnafected.įirst, create a branch in the submodule. This option is only valid for the update command. That branch will run the updated version of the Wagtail and have the parent repository reference that same branch, while the main branch in the submodule remains unchanged. ![]() However, what happens when you want to update a major dependency in one of your applications, like Wagtail, while other repositories still require an outdated version? There are different ways to approach this, but in this piece we will create a branch in the submodule. With a submodule (representing the pot), your distinct flowers are able to grow at their own pace while sharing one pot, since all flowers need common elements: water, sunlight, fertilizer, etc. There is no reason to create a different pot for every flower. Imagine you are growing 5 different flowers (representing repositories). According to GitHub, submodules “allow you to include or embed one or more repositories as a sub-folder inside another repository.” Submodules help us keep code dry when functionality is shared across multiple repositories. Recently I’ve been working with projects that use GitHub submodules. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |