Create a new local copy of a project 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.
On the MATLAB® Home tab, select New > Project > From Git or From SVN.
Alternatively, in the Simulink®start page, click one of the Project from Git or Project from SVN templates.
If you know your repository location, you can paste it into the Repository Path in the New Project From Source Control dialog box and proceed to step 4.
To browse for and validate the repository path to retrieve files from, click Change.
In the dialog box, specify the repository URL by entering or pasting a URL into the box, using the list of recent repositories, or by using the Generate URL from folder button .
Click Validate to check the repository path. If the path is invalid, check the URL against your source control repository browser.
If you see an authentication dialog box for your repository, enter login information to continue.
If necessary, select a deeper folder in the repository tree.
With SVN, you might want to check out from
trunk or a branch folder under
When you have finished specifying the URL path you want to retrieve, click OK.
In the New Project From Source Control dialog box , select the working folder where you want to put the retrieved files for your new project, and click Retrieve. With SVN, use local folders, because using a network folder is slow.
The source control pane (for example, Git or SVN) displays messages as the project retrieves the files from source control.
If your repository already contains a project, the project is ready when the tool finishes retrieving files to your selected sandbox folder.
If your sandbox does not yet contain a project, then a dialog box prompts you to check whether you want to create a project in the folder. To create a project, specify a project name and click OK.
The Welcome screen appears to help you set up your new project.
Click Set Up Project.
On the next screen, add your project folders to the project path.
On the next screen, specify any startup or shutdown files to automate tasks when you open and close projects. Alternatively, you can set up these files later. To learn more about these setup steps, see Create a New Project From a Folder.
The project automatically adds all your files to the project and displays the Files view. For next steps using your new project, try dependency analysis to visualize the structure of your files. See Run Dependency Analysis.
To update an existing project sandbox from source control, see Update Revisions of Project Files.
If you encounter errors like
OutOfMemoryError: Java heap space
when cloning big Git repositories, then edit your MATLAB preferences to increase the heap size.
On the Home tab, in the Environment section, click Preferences.
Select MATLAB > General > Java Heap Memory.
Move the slider to increase the heap size, and then click OK.