![]() ![]() gitmodules file - the file should be located in the top-level directory. In the parent repository find & open the. 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. Thus, the other applications remain unnafected.įirst, create a branch in the submodule. 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. If you have already cloned the repository, though, you must run these two commands to use the submodules: git submodule init git submodule update. ![]() Recently I’ve been working with projects that use GitHub submodules. The simpler way is to give the ‘recurse-submodules’ parameter when cloning the repository. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |