Main Content

Clone Git Repository

Create a new local copy of a project by retrieving files from Git™ source control.

  1. On the Home tab, click New > Project > From Git. The New Project From Source Control dialog box opens.

    Alternatively, on the Simulink® start page, click the Project from Git template.

  2. Enter your HTTPS repository path into the Repository path field.

  3. In the Sandbox field, select the working folder where you want to put the retrieved files for your new project.

  4. Click Retrieve.

    If an authentication dialog box for your repository appears, enter the login information for your Git repository account -- for instance, your GitHub® user name and personal access token.

    If your repository already contains a project, then 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 asks 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. For more information about setting up a project, see Create a New Project from a Folder.

You can now add, delete, and modify your project files. For details on how to commit and push the modified project files, see Commit Modified Files to Source Control.


Alternatively, to prevent frequent login prompts when you interact with your remote repository, you can clone a remote repository using SSH instead of HTTPS or install a credential helper. To avoid problems connecting using SSH, set the HOME environment variable and use it to store your SSH keys. For more information, see Configure MATLAB to Use Git SSH Authentication and Install Git Credential Helper.

See Also


Related Examples

More About