Clone a remote Git™ repository to retrieve repository files.
Right-click in the white space (any blank area) in the Current Folder browser, and select Source Control > Manage Files.
In the Manage Files Using Source Control dialog box, select
Git
from the Source control
integration list.
Click Change to browse for and validate the repository path. (If you know your repository location, you can paste it into the Repository Path box and proceed to step 7.)
In the Select a Repository dialog box, specify the repository path by
entering the path in the box, using the list of recent repositories, or by
using the Browse to a Git repository on disk button .
Click Validate to check the repository path.
If the path is invalid, check it against your source control repository browser.
If you see an authentication dialog box for your repository, enter login information to continue.
When you have finished specifying the path you want to retrieve, click OK.
In the Manage Files Using Source Control dialog box, select the sandbox folder where you want to put the retrieved files, and click Retrieve.
If you encounter errors like OutOfMemoryError: Java heap space
,
for example 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.
Restart MATLAB.