Updating Git Submodule Reference on Parent Repository
7 ビュー (過去 30 日間)
古いコメントを表示
I would like to use MATLAB's git GUI to do the following:
(I am not using Projects)
After committing all changes to a submodule. How can I update its reference on the parent repository?
Thanks in advance.
1 件のコメント
Prathamesh
2025 年 1 月 31 日
Hi @Eduardo can you please attach the screenshot of your parent repository and submodule in MATLAB (current folder) and screenshot of your remote(github) repo?
回答 (1 件)
Sivsankar
2025 年 2 月 11 日
If you've set up a project using the GitHub repository "ParentProject," the submodules (e.g., "SubModule") are recognized as GitHub submodules. You can also add Git submodules through MATLAB by following the instructions at this link:
Once your source control is set up, to have each submodule be a referenced project, you need to make the "SubModule" folder a project as well. After setting up .prj files in both the parent and submodule folders, you can link the submodule project as a referenced project for the parent project.
The file structure should look like this:
ParentProject/
.git
.gitignore
.gitmodules
ParentProject.prj
SubModule/
README.md
File1.m
SubModule.prj
To link the submodule repository as a referenced project under the ParentProject,:
- On the Project tab, in the Environment section, click References. The Add Reference dialog box opens.
- Browse to select the required project (.prj) file.
- In the Reference type field, select Relative since your project hierarchy has a well-defined root relative to your subproject root (e.g. your subproject is in a source controlled parent project folder)
- To create a checkpoint when you add the project, select Set a checkpoint to detect future changes. For more information about checkpoints, see Manage Changes in Referenced Project Using Checkpoints.
- Click Add.
For more information on how to add referenced projects, please see:
Thanks
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Octave についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!