Matlab .fig files under Git version control

I use Git for all my version control softwares. Regarding .fig files which are binary figure files in Matlab, how can I use them effectively under Git. I cannot see the changes made using
git diff
as they are binary. I am currently using Matlab 2017a. I deal with .fig files a lot and it becomes a pain to modify my figure files on every branch separately due to the changes made. Is there any way to deal with this issue?

답변 (1개)

Sean de Wolski
Sean de Wolski 2017년 10월 10일

0 개 추천

You can see some of the changes by comparing revisions in MATLAB Git from within the current folder browser. It's limited in what you can compare but may help.
Out of curiosity, why do you need to store the fig files and not just scripts or functions that reproduce them which would be text?

댓글 수: 3

Saurabh Bagalkar
Saurabh Bagalkar 2017년 10월 10일
편집: Saurabh Bagalkar 2017년 10월 10일
Sean, I store callbacks of the pushbuttons within the GUIt inspector. I also add pushbuttons to these GUI's.Now whenever I have to make changes to the front end on a specific branch, I encounter merge conflicts due to some other version of these fig files conflicting in another branch and I have to redo my entire design to accommodate the recent changes
Sean de Wolski
Sean de Wolski 2017년 10월 10일
If I were you, I'd strongly consider the idea of using code to generate the figure and callbacks. See Matt's GUI Examples here:
Walter Roberson
Walter Roberson 2017년 10월 11일
If you are currently using guide, then there is a way to tell it to generate the code that would recreate the .fig

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

태그

질문:

2017년 10월 10일

댓글:

2017년 10월 11일

Community Treasure Hunt

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

Start Hunting!

Translated by