Use Source Control with Projects
You can use projects to work with files under source control. Source control stores files in
a repository, lets you check files out of the repository to work on and back into it to
preserve changes, and lets you see the history of the different versions of files that have
been checked in. For more information about using source control in MathWorks
products, see “About MathWorks Source Control Integration” on page 32-3.
Projects integrate with two source control systems, Git and Subversion (SVN).
To set up a project with source control, use any of these workflows:
- Create a new project from an existing repository.
- Add an existing project to source control.
- Create a new project in a folder already under source control.
Then, when your project is under source control, you can perform operations from within
MATLAB such as checking files in and out, running checks, and committing and reverting
changes.
Setup Source Control
There are three ways to set up a project with source control.
Create New Project from Existing Repository
Create a new local copy of a project from an existing repository by retrieving files from
source control. You can clone a Git repository, or check out files from an SVN repository,
or use another source control integration.
To create a new project from an existing repository:
(^1) On the Home tab, click New > Project > From Git or New > Project > From SVN.
The Create New Project from Source Control dialog box opens.
(^2) If you know your repository location, paste it into the Repository Path field.
Otherwise, to browse for and validate the repository path to retrieve files from, click
Change.
31 Projects