Source Control in Projects
Projects help you to organize large modeling projects by finding required files, managing and sharing files and settings, and interacting with source control. Watch Using Projects to Collaborate, Track, and Merge Changes and Perform Code Reviews (4 min, 50 sec) and see What Are Projects? and About Source Control with Projects.
Interact with Source Control
|Get current project|
|Load an existing project|
|List modified files in project|
|Get files required by specified project files|
|Get files impacted by changes to specified project files|
|Update source control status of project files|
|Run all project checks|
|Checksum of file|
|(Not recommended) Open project and get project object|
Source Control Setup
What source control tools and workflows can I use in a project? Try built-in Git or SVN, or integrate third-party tools.
Add Git or SVN source control to your project.
Register model files as binary.
Configure Git, register model files, and use SSH Authentication with MATLAB®.
Enable MATLAB Git™ integration to automatically merge model files.
Create an empty remote GitHub® repository.
To share your project, make your project publicly available on GitHub.
Clone an external Git repository as a submodule.
Configure SVN, register model files, lock files, share repositories, and manage SVN externals.
Disable source control to prepare a project template.
Archive a project and create a new one with a different source control.
Use the Software Development Kit (SDK) to integrate projects with third-party source control tools.
Use the MATLAB Comparison Tool for diff and merge from external source control tools.
Retrieval and Checkout
Retrieve a working copy of a project from Git source control.
Retrieve a working copy of a project from SVN source control.
With SVN, tag specific revisions of a project.
Check for locally modified project files.
Find out if the repository version has moved ahead.
Update revisions with Git or SVN.
With SVN, ensure users get locks on model files before editing.
Reviewing Changes and Committing Modified Files
Examine changes in the project.
Review changes in modified files by comparing with ancestors, or compare particular revisions.
Check projects for problems such as unsaved changes, files not under source control, or derived files out-of-date.
Commit a change set to the local Git repository or SVN repository.
Discard local changes or choose a revision for a file or the whole project.
Git workflow for fetching, merging and pushing changes to the remote repository.
Create, switch, merge, revert, and delete branches.
Locate and resolve conflicts; merge text files and merge models; extract conflict markers.
Best practices for derived files, such as