You can use MATLAB® to work with files under source control. You can perform operations such as update, commit, merge changes, and view revision history directly from the Current Folder browser.
MATLAB integrates with:
Subversion® (SVN)
Git™
To use source control in your project, use any of these workflows:
Retrieve files from an existing repository. See Check Out from SVN Repository or Retrieve Files from Git Repository.
Add source control to a folder. See Create New Repository.
Add new files in a folder already under source control. See Mark Files for Addition to Source Control.
Additional source control integrations, such as Microsoft® Source-Code Control Interface (MSSCCI), are available for download from the Add-On Explorer. For more information, see Get and Manage Add-Ons.
This diagram represents the classic source control workflow (for example, using SVN).
Benefits of classic source control:
Locking and user permissions on a per-file basis (e.g., you can enforce locking of model files)
Central server, reducing local storage needs
Simple and easy to learn
This diagram represents the distributed source control workflow (for example, using Git).
Benefits of distributed source control:
Offline working
Local repository, which provides full history
Branching
Multiple remote repositories, enabling large-scale hierarchical access control
To choose classic or distributed source control, consider these tips.
Classic source control can be helpful if:
You need file locks.
You are new to source control.
Distributed source control can be helpful if:
You need to work offline, commit regularly, and need access to the full repository history.
You need to branch locally.