Main Content

Add a Project to Source Control

Add a Project to Git Source Control

If you want to add version control to your project files without sharing with another user, it is quickest to create a local Git™ repository in your sandbox.

  1. On the Project tab, in the Source Control section, click Use Source Control.

  2. In the Source control Information dialog box, click Add Project to Source Control.

  3. In the Add to Source Control dialog box, in the Source control tool list, select Git to use the Git source control tool provided by the project.

  4. Click Convert to finish adding the project to source control.

    Git creates a local repository in your sandbox project root folder. The project runs integrity checks.

  5. Click Open Project to return to your project.

    The Project node displays the source control name Git and the repository location Local Repository: yoursandboxpath.

  6. Select the Modified files view and click Commit to commit the first version of your files to the new repository.

    In the dialog box, enter a comment if you want, and click Submit.

Tip

If you want to use Git and share with other users:

  • To clone an existing remote Git repository, see Clone Git Repository.

  • To connect an existing project to a remote repository, on the Project tab, in the Source Control section, click Remote and specify a single remote repository for the origin branch.

  • To make your project publicly available on GitHub®, see Share Project on GitHub.

Add a Project to SVN Source Control

Caution

Before you start, check that your sandbox folder is on a local hard disc. Using a network folder with SVN is slow and unreliable.

This procedure adds a project to the built-in SVN integration that comes with the project. If you want to use a different version of SVN, see Set Up SVN Source Control.

  1. On the Project tab, in the Source Control section, click Use Source Control.

  2. In the Source control Information dialog box, click Add Project to Source Control.

  3. In the Add to Source Control dialog box, select SVN as the Source control tool.

  4. Next to Repository path, click Change.

  5. In the Specify SVN Repository URL dialog box, to specify an existing repository, click the button to browse for your repository, paste a URL into the box, or use the list to select a recent repository.

  6. Click Validate to check the path to the selected repository.

    When the path is valid, you can browse the repository folders. For example, select the trunk folder, and verify the selected URL at the bottom of the dialog box, as shown.

  7. Click OK to return to the Add to Source Control dialog box.

    If your repository has a file URL, a warning appears that file URLs are for single users. Click OK to continue.

  8. Click Convert to finish adding the project to source control.

    The project runs integrity checks.

  9. After the integrity checks run, click Open Project to return to your project.

    The Project node displays details of the current source control tool and the repository location.

Caution

Before using source control, you must register model files with your source control tools to avoid corrupting models. See Register Model Files with Subversion.

Related Examples

More About