Matlab models GIT - LFS storage. Not able to compare models
14 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Vit Kolar
le 22 Juin 2021
Commenté : Vit Kolar
le 15 Août 2022
Hello. I have .slx models stored as LFS in Bitbucket. When I try to compare previous revisions I get mesage:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/660935/image.jpeg)
and truly the file at the location contains just the following.
version https://git-lfs.github.com/spec/v1
oid sha256:a46f1364fc7d03ee20ad71600b77....
size 82305
The LFS is correctly installed. For models stored without LFS the comparing works well. I was told LFS should be set for models (MLD, SLX) otherwise it'll slow the responsiveness of the git. Is there anything I'm missing? Thanks.
2 commentaires
Fabian Stein
le 19 Mai 2022
Is there still no solution available, such that the conflict can be resolved within MATLAB? Basically MATLAB would need to create the base/mine/theirs and merged files using the git mergetool command. I would understand that MATLABs git lfs support means that I can use this intuatively.
Fabian Stein
le 25 Mai 2022
I just tested it with 2021b, where it works like a charm. According to MATLAB support this has been solved in 2021a.
Réponse acceptée
Fabien Jeanneteau Safran
le 15 Sep 2021
Hello Vit,
I have the same issue in Simulink 2018b.
As there is not so much documentation on LFS for the version (instead of 2021a), I assumed the feature "Compare LFS objects" is not working/possible in my version.
As a workaround, I configured another Git Client to use the MATLAB Diff executables. Please refer to page https://fr.mathworks.com/help/releases/R2018b/matlab/matlab_prog/customize-external-source-control-to-use-matlab-for-comparison-and-merge.html?s_tid=doc_srchtitle (please check for the MATLAB version you have).
Short story, use following command to get paths for Diff and Merge operations that you will need to give to your other Git Client:
comparisons.ExternalSCMLink.setup
For me, it gave:
>>>
This preference is now enabled: Allow external source control tools to use open MATLAB sessions for diffs and merges.
Use the following file paths to customize your external source control client.
Diff: C:\Program Files\MATLAB\R2018b\bin\win64\mlDiff.exe
Merge: C:\Program Files\MATLAB\R2018b\bin\win64\mlMerge.exe
<<<
Hoping it can help you.
3 commentaires
Arman
le 15 Août 2022
Modifié(e) : Arman
le 15 Août 2022
@Vit Kolar Did you happen to have an issue with mergetool also? I can compare using the workaround, but the mergetool still does not work. I get the following error
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1098625/image.png)
I tried calling the mergetool from Matlab (right click -> view conflicts) and Git Terminal (git mergetool -t mlMerge . . . ) but neither of them manages to open the file
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Source Control Integration dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!