Matlab git tools are lacking and can be confusing
19 views (last 30 days)
Show older comments
Matlab has some built in git functionality that lets you do git commands without the use of the command line (similar to ToroiseGit). But the features are a bit limited and and times confusing, forcing me to resort to using the command line. I have two issues:
Commit a submodule
I'm using a submodule but not using Project. When I point the submodule to a new commit, the git status in the command line shows something like "submodule (new commits)". TortoiseGit also shows this. If you right click and go to Source Control -> View and Commit Changes it will let you pull up the commit dialog box but the change list is empty (assuming you have no other changes). If you click commit it will commit the update to the submodule index, which is what I want, but it's confusing that this change is not listed in the change list. Both the git command line "git status" and TortoiseGit show this type of thing as change to be committed.
Git Pull
Another issue is the git pull button. I have a configuration setting in git of git config submodule.recurse true. This means that when i do a git pull it will automatically pull any updates to the submodule. But for some reason this does not work when using the Matlab Pull button. It does work if you use git pull in git bash or !git pull in matlab (which pipes to git bash). So does the matlab Pull button not just do git pull using your local git install? I read somewhere that Matlab has some git functionality built in that does not use your local install of git. Is this why the Pull operation does not honor my configuration settings?
1 Comment
Cris LaPierre
on 18 Apr 2025
I would encourage you to submit your feedback directly to MathWorks. You can do that here: https://supportcases.mathworks.com/mwsupport/s/casetypeselection?language=en_US&c__caseParameter=productusage&s_tid=srlp_product
Answers (0)
See Also
Categories
Find more on Source Control in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!