![]() After cloning, the submodule in master branch is well cloned. How to add sub-modules to github repository Ask Question Asked 7 years ago Modified 2 years, 1 month ago Viewed 11k times 5 Hello i am looking for a way to add my submodules to my github repo for example iris I tried git add git add. I made a test by putting the same submodule in master branch. ![]() Actual behaviorĪfter switch the branch, the submodule folder is empty. The git submodule init command creates the local configuration file for the submodules, if this configuration does. If you add a submodule, you can specify which branch should be tracked via the -b parameter of the submodule add command. Adding a submodule to a Git repository and tracking a branch. Visual Studio Code 1.49.3 Steps to reproduce the behaviorĪll the scripts or models supposed to be include in the submodule folder. Creating repositories with submodules 3.1. For many projects, submodules aren’t the best answer (more on this below), and even at their best, working with submodules can be tricky, but let’s start by looking at a straight-forward example. git submodule update to finally get the 'content' of the submodule So everything is right until I try to switch the branch in GitHub Desktop (to another. I think both problems are because of the same reason. Submodules allow you to include or embed one or more repositories as a sub-folder inside another repository. Switch to the branch with the submodule in GitHub Desktop git submodule init Until now I can switch the branches (between the ones with the submodule and no submodule without any issues). Another option is git push -recurse-submoduleson-demand which will try to push the submodules automatically (if necessary) before pushing the parent repo.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |