Main Content

Create New GitHub Repository

Creating a GitHub® repository adds Git™ source control to your new or existing project. The GitHub repository you create becomes the project remote repository. To create a GitHub repository, you must have a GitHub account.

To create a blank project and a GitHub remote repository:

  1. On the Home tab, click New > Project > From Git.

  2. Select New > GitHub Repository. In the GitHub dialog box, enter your User name and Password. Fill the Repository name and Description fields and click Create.

    MATLAB® creates a new public GitHub repository and populates the Repository path field with information in the https://github.com/myusername/mynewrepository format.

  3. In the Sandbox field, specify the location for your sandbox. The selected folder must be empty. Click Retrieve to create the sandbox.

    To confirm the project name and creation, click OK.

After creating the GitHub repository and sandbox, add your files to the sandbox. Commit the first version of your files to your local repository, then push all modifications to your remote GitHub repository.

Tip

If you want to create a remote GitHub repository for an existing project, share your project to GitHub instead.

With your project loaded, on the Project tab, select Share > GitHub. For detailed instructions, see Share Project on GitHub.