![]() Also, Git submodules allow you to include and track the version history of external code in your Git repository. ![]() Git submodules enable you to preserve one git repository as a sub directory of another. These pointers lead to a submodule commit in a different repository. You don’t clone or integrate any of the actual code in your new repository when you use many submodules, it’s better to say that you include links to the forest repository on GitHub. They are easy for a team to work together at the same time. Submodules are similar to child repositories in the way that pointer commits must be manually updated. ![]() Project management is advantageous in a variety of ways. What is git submodule – why and how to use it?Ī Git submodule is a separate repository within a repository, to put it simply. We will show you the key differences, so you can decide which choice is the best for you. This post was written to assist you in managing projects using Git subtree and submodule. When such a thing happens, you want to keep both projects distinct yet you want to be able to use one of them in a different one. It might be a library built by other developers, or a piece of the project developed independently and then reused in several projects. This is a public inbox, see mirroring instructionsįor how to clone and mirror all data and code used for this inbox Īs well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).While working on a project, it’s common to have it combined with another one, especially if you work in a network with other people. is used Krzysztof OpasiakĬode repositories for project(s) associated with this public inbox 21:49 ` Recursive submodules fails to track branch correctly if. Local SUBMODULE_LIST=`git submodule-helper status | awk '` The script (to be executed in SUP2 right after clone): $ git submodule update -rebase -recursive -remote Git checkout and I do this recursively in all modules. Submodule, set local branch to point to current head and then just do I managed to workaround this bug by dropping the recursive option andĪfter the top level project has been cloned I go through every Propagate the traced branch information to submodules. All the submodules are always initialized in aĭetached head state and there is no way to change this behavior nor to The root cause is that the traced branch information is never propagated To SUP1 dir and check the branch info you will notice that the repo is Actually this function behaves correctly. Submodule-helper.c and it is generated called from SUP1 dir (due to The error message comes from remote_submodule_branch():1938 in Unable to find current origin/ revision in submodule path 'SUB_PROJECT' Superproject, but the superproject is not on any branch $ git submodule update -init -recursive -remoteĪs every time you will get an error message similar to this one:įatal: Submodule (SUB_PROJECT) branch configured to inherit branch from $ git clone SUP2 & git submodule update -init -recursive -remote If you try to do this you won't be able to execute any of the following The nesting structure would look like this: Try to add superproject (SUP1) with such configuration as a submodule toĪnother superproject (SUP2). ![]() This works perfectly fine as long as you don't This means that git should trace the same branch as is currently I'd like to report you a potential bug in git submodule implementation.Īccording to doc a special value of "." can be used as a branch name to ![]() To: git +Cc: cedric.ollivier, DEBEAU Eric IMT/OLN 21:49 ` Krzysztof Opasiak 0 siblings, 0 replies only message in threadįrom: Krzysztof Opasiak 21:49 UTC ( / raw) is used mailing list mirror (one of many) help / color / mirror / code / Atom feed * Recursive submodules fails to track branch correctly if. Recursive submodules fails to track branch correctly if. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |