Retrieve Files from Git Repository

You can use source control with projects. For more information, see Clone from Git Repository and Use Source Control with Projects.

Clone a remote Git™ repository to retrieve repository files.

  1. Right-click in the white space (any blank area) in the Current Folder browser, and select Source Control > Manage Files.

  2. In the Manage Files Using Source Control dialog box, select Git from the Source control integration list.

  3. 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.

    1. In the Select a Repository dialog box, browse to your repository using the Remote button .

    2. Click Validate to check the repository path.

      If you see an authentication dialog box for your repository, enter the login information to continue.

    3. If the path is valid, click OK. The dialog box closes and you return to the Manage Files Using Source Control dialog box.

  4. In the Manage Files Using Source Control dialog box, select the sandbox folder to store the retrieved files and click Retrieve.

    If you see an authentication dialog box for your repository, enter the login information to continue.

Troubleshooting

If you encounter errors like OutOfMemoryError: Java heap space, for example when cloning big Git repositories, then edit your MATLAB® preferences to increase the memory size.

  1. On the Home tab, in the Environment section, click Preferences.

  2. Select MATLAB > General > Java Heap Memory.

  3. Move the slider to increase the heap size, and then click OK.

  4. Restart MATLAB.

Related Topics