Use Source Control with Projects . . . . . . . . . . . . . . . . . . . . . . . . . .
32-45
Setup Source Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32-45
Perform Source Control Operations . . . . . . . . . . . . . . . . . . . . . . . 32-47
Work with Derived Files in Projects . . . . . . . . . . . . . . . . . . . . . . . 32-54
Find Project Files With Unsaved Changes . . . . . . . . . . . . . . . . . . . 32-55
Manage Open Files When Closing a Project . . . . . . . . . . . . . . . . . 32-55
Create and Edit Projects Programmatically . . . . . . . . . . . . . . . . . . 32-56
Explore an Example Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32-63
Source Control Interface
33
About MathWorks Source Control Integration . . . . . . . . . . . . . . . . . 33-2
Classic and Distributed Source Control . . . . . . . . . . . . . . . . . . . . . . 33-2
Select or Disable Source Control System . . . . . . . . . . . . . . . . . . . . . 33-4
Select Source Control System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33-4
Disable Source Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33-4
Create New Repository . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33-5
Create Git Repository on Your Local System . . . . . . . . . . . . . . . . . . 33-5
Review Changes in Source Control . . . . . . . . . . . . . . . . . . . . . . . . . . 33-7
Mark Files for Addition to Source Control . . . . . . . . . . . . . . . . . . . . 33-8
Resolve Source Control Conflicts . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33-9
Examining and Resolving Conflicts . . . . . . . . . . . . . . . . . . . . . . . . . 33-9
Resolve Conflicts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33-9
Merge Text Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33-10
Extract Conflict Markers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33-10
Commit Modified Files to Source Control . . . . . . . . . . . . . . . . . . . . 33-12
Revert Changes in Source Control . . . . . . . . . . . . . . . . . . . . . . . . . . 33-13
Revert Local Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33-13
Revert a File to a Specified Revision . . . . . . . . . . . . . . . . . . . . . . . 33-13
Set Up SVN Source Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33-14
SVN Source Control Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33-14
Register Binary Files with SVN . . . . . . . . . . . . . . . . . . . . . . . . . . . 33-14
Standard Repository Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . 33-17
Tag Versions of Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33-17
Enforce Locking Files Before Editing . . . . . . . . . . . . . . . . . . . . . . 33-17
Share a Subversion Repository . . . . . . . . . . . . . . . . . . . . . . . . . . . 33-18
Check Out from SVN Repository . . . . . . . . . . . . . . . . . . . . . . . . . . . 33-19
Retrieve Tagged Version of Repository . . . . . . . . . . . . . . . . . . . . . 33-19
xxvii