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.
On the Project tab, in the Source Control section, click Use Source Control.
In the Source control Information dialog box, click Add Project to Source Control.
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.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.
Click Open Project to return to your project.
The Project node displays the source control name
Git
and the repository locationLocal Repository:
.yoursandboxpath
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.
On the Project tab, in the Source Control section, click Use Source Control.
In the Source control Information dialog box, click Add Project to Source Control.
In the Add to Source Control dialog box, select
SVN
as the Source control tool.Next to Repository path, click Change.
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.
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.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.
Click Convert to finish adding the project to source control.
The project runs integrity checks.
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
- Set Up Git Source Control
- Set Up SVN Source Control
- Register Model Files with Source Control Tools
- Clone Git Repository
- Check Out SVN Repository
- Get SVN File Locks
- Work with Project Files
- View Modified Files
- Commit Modified Files to Source Control