![]() The following are a few best use cases for git submodules. If you need to maintain a strict version management over your external dependencies, it can make sense to use git submodules. gitmodules file will have an entry for each submodule. If the host repository has multiple submodules, the. gitmodules file contains meta data about the mapping between the submodule project's URL and local directory. When adding a submodule to a repository a new. Submodules do not track git refs or branches and are not automatically updated when the host repository is updated. Submodules are very static and only track specific commits. Both of these suggested incorporation methods do not enable tracking edits and changes to the external repository.Ī git submodule is a record within a host git repository that points to a specific commit in another external repository. This method has the downside of requiring installation and version management at all places the origin code is deployed. Another method of incorporating external code is through the use of a language's package management system like Ruby Gems or NPM. This method has the downside of losing any upstream changes to the external repository. The external code can be directly copied and pasted into the main repository. ![]() This external code can be incorporated in a few different ways. Often a code repository will depend upon external code. Git submodules enable a Git repository to incorporate and track version history of external code. Git submodules are simply a reference to another repository at a particular snapshot in time. Git submodules allow you to keep a git repository as a subdirectory of another git repository. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |