Track Simulink slx Files

12 ビュー (過去 30 日間)
Wei Yang Shen
Wei Yang Shen 2020 年 10 月 25 日
コメント済み: Wei Yang Shen 2020 年 10 月 28 日
Is there a way to track simulink files with Git? From the set up page, it suggested to add slx files to gitattributes as a binary to prevent git from potentially corrupting the file contents. The issue is that now merging is a pain because the gitattributes will not make merge attempts which means I have to go download the changes to a new location and open that simulink file and manually compare and then copy the new simulink file in to resolve the conflicts. Is there another way to do this?

回答 (2 件)

Fangjun Jiang
Fangjun Jiang 2020 年 10 月 26 日
Simulink .slx file IS binary format so you really don't have a choice. Previous .mdl file is textual but it is not wise to rely on any textual diff tool to do the diff and merge.
Use the built-in Simulink diff capability to track changes and do the merge, although its performance is somethat not ideal.
  1 件のコメント
Wei Yang Shen
Wei Yang Shen 2020 年 10 月 27 日
So basically if I want to rebase to squash or rename etc, I have to do it via Simulink itself instead of via terminal?

サインインしてコメントする。


Steven Lord
Steven Lord 2020 年 10 月 27 日
This documentation page includes instructions on how to configure source control tools to use tools provided by MathWorks to diff, merge, and automerge MathWorks file formats. It specifically shows the workflow for Git and SVN.
  1 件のコメント
Wei Yang Shen
Wei Yang Shen 2020 年 10 月 28 日
But how would this work for making a PR to a remote such as one on github. If someone approves of my PR, the gitattributes will ignore pulling in the changes from the slx file?

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeNaming Conventions についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by