I am using Git and I am using MATLAB/Simulink.
I know that there is some kind of integration in the new versions of MATLAB/Simulink with Git but I was wondering if there is an easy way to read a git diff
between 2 Simulink models which are of the format .slx
This can be useful when, for example, you have a simulink model in which you have a so-called MATLAB Embedded Function and you want to understand what the differences are between the functions in different versions of your software.
It can be also useful to understand the blocks which were commented and all the differences between two different Simulink
models (.slx
).
I found a solution to my problem.
.git
folder.config
(create it if it is not available, but it should be there normally). Add the following code to the file:
[diff "slx"]
textconv = unzip -c -a
Then you need to create or modify the file REPOSITORY/.gitattributes
and add:
*.slx diff=slx
In this way when you do a git diff
on a Simulink model (.slx
) you will have a quite readable result.
I hope it will help someone else.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With