![]() ![]() The only difference is that the command execution takes place in the submodule directory.ġ. ![]() Publishing Submodule ChangesĬhanges made on a submodule locally are published similarly to any other repository changes in Git. The -init flag in the command above is important in case new submodules have been created in the remote commit. If a submodule is changed as a part of the superproject's commit, pull the changes by following the procedure below:ġ. And to learn about obtaining repositories containing submodules, refer to our guide on Git submodule checkout. Note: For more details on pulling the latest submodule version, read How to Pull the Latest Git Submodule. ![]() The output shows Git cloning the repository into the project's subdirectory. Provide the URL of the submodule's origin repository to the add command: git submodule add Go to the main directory of your project: cd Ģ. git submodule addĪdd a submodule to your main repository using the git submodule add command.ġ. The sections below list the most common git submodule commands and their options. Use git submodule to create, update, and manage submodules. The Git command-line interface has a dedicated subcommand for manipulating submodules. This way, developers ensure consistency between various products using the same feature. For example, developers of microservice-based apps can design and update each microservice separately to preserve independent change histories.Īnother benefit is that multiple projects can share the code maintained in a single repository. Git submodules are helpful when working with complex projects. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |