Main Content

About Source Control with Projects

You can use a project to work with source control. You can perform operations such as update, commit, merge changes, and view revision history directly from the project environment.

In MATLAB®, projects have interfaces to:


You can check for updated source control integration downloads on the projects Web page:

To use source control in your project, use any of the following workflows:

When your project is under source control, you can:


Before using source control, you must register model files with your source control tools to avoid corrupting models. See Register Model Files with Source Control Tools.

To view an example project under source control, see Explore Project Tools with the Airframe Project.

Classic and Distributed Source Control

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.

Related Topics