Share Projects

You can collaborate with others by packaging and sharing projects. You can also control which files are included in a shared project by using labels and an export profile. (For more information, see Create an Export Profile.)

This table describes the ways of packaging a project.

Way to Share ProjectsProcedure
Create an archive to share.

You can convert your project to a .mlproj or ZIP archive and share the archive with collaborators. Sharing an archive is useful when working with someone who does not have access to a connected source control tool.

To archive a project:

  1. With the project loaded, on the Project tab, click Share > Archive.

  2. If you want to export only a set of specified files, choose an Export profile. For more information, see Create an Export Profile.

  3. If you have referenced projects and want to export the referenced project files, select Include referenced projects.

  4. Click Save As and specify a file path.

  5. In the Save as type field, select the archived project file type. By default, MATLAB® archives the project as an .mlproj file. You can choose to archive the project as a ZIP file.

  6. Click Save to create the project archive.

You can now share the archive file the way you would any other file.

Email an .mlproj archive in one step.

On Windows® systems, you can generate an .mlproj archive and attach it to an email in one step. Sharing an archive is useful when working with someone who does not have access to a connected source control tool.

To email a project as an .mlproj file:

  1. With the project loaded, on the Project tab, select Share > Email.

  2. If you want to export only a set of specified files, choose an Export profile. For more information, see Create an Export Profile.

  3. If you have referenced projects and want to export the referenced project files, select the Include referenced projects check box.

  4. Click Attach to Email. MATLAB opens a new email in your default email client with the project attached as an .mlproj file.

  5. Edit and send the email.

Create a toolbox to share.

You can create a toolbox from your project and share the toolbox with collaborators.

To create a toolbox from your project:

  1. With a project loaded, on the Project tab, select Share > Toolbox.

    The packager adds all project files to the toolbox and opens the Package a Toolbox dialog box.

  2. The Toolbox Information fields are populated with the project name, author, and description. Edit the information as needed.

  3. To include files not already included in the project files, edit the excluded files and folders.

  4. Click Package.

You can now share the toolbox file the way you would any other file.

Publish on GitHub®.

You can share a project by making it publicly available on GitHub. You must first have a GitHub account.

Sharing a project on GitHub adds Git™ source control to the project. If your project is already under source control, sharing replaces the source control configuration with Git, andGitHub becomes the project's remote repository.

Note

If you do not want to change your current source control in the open project, share the project in another way.

To share a project on GitHub:

  1. With a project loaded, on the Project tab, select Share > GitHub. The Create GitHub Repository dialog box opens.

    If GitHub is not an option in the Share menu, select Share > Change Share Options. Then, in the Manage Sharing dialog box, select GitHub and click Close.

  2. Enter your GitHub user name and password, and edit the name for the new repository. Click Create.

    A warning prompts you to confirm that you want to create a public repository and modify the current project’s remote repository location. To continue, click Yes.

  3. The Create GitHub Repository dialog box displays the URL for the new repository. Click the link to view the new repository on the GitHub website. The repository contains the initial check-in of your project files.

  4. The source control in your current project now references the new repository on GitHub as the remote repository. To use the project with the new repository, in the Create GitHub Repository dialog box, click Reload Project.

To view the URL for the remote repository, on the Project tab, in the Source Control section, click the Git Details button.

You can use Git without any additional installation. To perform merging operations in Git, additional setup steps are required. For more information, see Set Up Git Source Control.

Collaborate using source control.You can collaborate using source control within projects. For more information, see Use Source Control with Projects.

Before sharing a project with others, it can be useful to examine the required toolboxes for your project by performing a dependency analysis. For more information, see Find Required Toolboxes.

Create an Export Profile

If you want to exclude files from a project before sharing it, create an export profile. An export profile allows you to exclude files with particular labels. For more information about creating labels and adding them to project files, see Create Labels.

To create an export profile:

  1. On the Project tab, click Share > Manage Export Profiles.

  2. Click + and specify a name for the export profile.

  3. In the Files pane, click + and select the labels for the files you do not want to export, and then click OK.

  4. In the Labels pane click + and select the custom labels you do not want to export, and then click OK.

  5. Click Apply and close the Manage Export Profiles dialog box.

Note

Export profiles do not apply changes to referenced projects. When you share your project, MATLAB exports the entire referenced projects.

Related Topics