How to connect a Simulink Project to an existing Git repository.

5 vues (au cours des 30 derniers jours)
Ubaldo
Ubaldo le 23 Nov 2014
Modifié(e) : Ubaldo le 23 Nov 2014
Hi all,
I am working on a project which, among others, includes several Matlab/Simulink files. I am currently performing version control through Git (for instance, I have Git Bash installed). However, with this setup, I found extremely hard to merge two branches when there are different version of the same Simulink model, since Git open .mdl files as text files. On the other hand, I have discovered that it is possible to perform version control through Git directly from Simulink! That is AMAZING!
Nevertheless, I have to setup my environment to be able to do that, and I have a couple of questions. Assume that my working folder is called MyProject and I am currently tracking some files/subfolders in there.
1. To start using Simulink project together with Git, I don't understand if I should create a new Simulink Project with MyProject as "main" directory and then "Select from Source Control" indicating the already existing remote repository, or if I should do the other way around, i.e.I have to select "Add project to source control" and then perform a "push" to the remote repository to have everything aligned.
2. If I change some non-matlab file (e.g. some .txt or .xml file), can I still use Git with Git Bash, or I necessarily have to use Simulink GUI all the time?
Thanks!

Réponses (0)

Catégories

En savoir plus sur Project Management dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by