![]() ![]() cd submodule git checkout -b NEWBRANCHNAME COMMITID. Hence enter the dependency root by using cd submodule and use any git command. See commit 40e747e () by Denton Liu ( Denton-L). git submodules are repositories inside a repository, hence it has the same behavior as any other git repository. Note: Git 2.24 (Q4 2019) makes clear the -default and -branch options are mutually exclusive. ![]() In your case, for all submodules, using git submodule foreach: git submodule foreach 'git submodule set-branch -branch aBranch - $.branch ' Adds the submodule to the repo, and in the browser we can see. Now from your primary repository you still have two modified objects. Just easily I could set it to specific commit or tag. If you have been following the previous guides, and other materials, you should have a clearer understanding of what Git is, what it does, how to use it best, and how to troubleshoot. The name of the branch is recorded as submodule.branch in. This teaches git-submodule the set-branch subcommand which allows the branch of a submodule to be set through a porcelain command without having to manually manipulate the. git commit -am 'adding and commiting all in one command' git push. git checkout -b devbranch origin/devbranch Now the submodule is fixed on the development branch instead of HEAD of master. Here, we will be covering two more major features that Git has to offer: tags and sub-modules. In git 1.8.2+ git submodule add -b branchname URLtoGitrepo optionaldirectoryrename. (Merged by Junio C Hamano - gitster - in commit 01f8d78, ) submodule: teach set-branch subcommand See commit b57e811, commit c89c494 (), and commit 7a4bb55 () by Denton Liu ( Denton-L). Submodule.*.branch settings to be modified. With Git 2.22 (Q2 2019, four years later), you will be able to use git submodule set-branch -b, because git submodule learns set-branch subcommand that allows the ad1 (Git 2.22, Q2 2019, has introduced git submodule set-branch -branch aBranch - ) Note that if you have an existing submodule which isnât tracking a branch yet, then (if you have git 1.8.Looking for a way to recursive set the branch in the. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |