Does Simulink project git version control only work when the *.prj and .SimulinkProject are placed in the root of the repository?

1 次查看(过去 30 天)
I can set up a simulink project in git as described in the help-docs without problem, where the *.prj and .SimulinkProject are in the same folder as .git.
However, I have a large already existing git repository that I would like to use for simulink projects. But I do not want to have simulink *.prj and .SimulinkProject lying in the root of the repository. I just want the entire Simulink project to lie in a subfolder of the git-repository. I have tried this, but don't see how to get the project under git source control.
Isn't that possible? I feel I have searched everywhere, but can't find any description this.

回答(2 个)

Jiri Findejs
Jiri Findejs 2018-8-10
Anyone aware of any progress on this feature?
I'm trying to setup multiple Simulink projects (R2018a) in one Git repository and the integration with source control still does not work.

goerk
goerk 2015-12-3
I had the same question and got this answer:
We do not support the feature for Git. Our development is aware of this limitation and will try to fix it in future releases.
However currently it is feasible under SVN. Nevertheless we can provide 2 workarounds:
  • Create a root git repository and add Simulink files under this repository. Keep it unlinked from the project manager panel. You will not be able to do git operation when you open a project file, but you will be able to do git operation under the explorer view instead (The default left panel when you do not open any project file).
  • Create a root repository and another git repository linked to the Simulink project. The only issue is that you might have to commit 2 times, one time under root repository and one time under the Simulink project. Nevertheless it looks like git has a mechanism for that called "submodules". This might be the key to not having to commit multiple times. Please find an explication on this link:

类别

Help CenterFile Exchange 中查找有关 Project Management 的更多信息

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by