![]() See commit 40e747e () by Denton Liu ( Denton-L). The example that follows demonstrates how to update a submodule to the most recent commit in the master branch. Note: Git 2.24 (Q4 2019) makes clear the -default and -branch options are mutually exclusive. In Git, when you add a submodule, you just add information about the submodule the submodules actual code is not committed to the main repository. In your case, for all submodules, using git submodule foreach: git submodule foreach 'git submodule set-branch -branch aBranch - $.branch ' ![]() mkdir git-submodule-demo cd git-submodule-demo/ git init Initialized empty Git repository in /Users/atlassian/git-submodule-demo/. The following is an example that creates an empty repo and explores git submodules. 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. The git submodule add is used to add a new submodule to an existing repository. ![]() (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. The file contains one subsection per submodule, and the subsection value is the name of the submodule. 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 gitmodules file, located in the top-level directory of a Git working tree, is a text file with a syntax matching the requirements of git-config 1. Looking for a way to recursive set the branch in the.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |