Create New Repository
You can use MATLAB to add source control to files in a folder. If you want to add version
control to your files without sharing with another user, it is quickest to create a local Git
repository in your sandbox.
To use a Git server for your remote repository, you can set up your own Apache™ Git
server or use a Git server hosting solution. If you cannot set up a server and must use a
remote repository via the file system using the file:/// protocol, make sure that it is a
bare repository with no checked out working copy.
For SVN, check that your sandbox folder is on a local hard disk. Using a network folder
with SVN is slow and unreliable.
Before using source control, you must register binary files with your source control tools
to avoid corruption. See “Register Binary Files with SVN” on page 32-18 or “Register
Binary Files with Git” on page 32-32.
TipTo check out an existing SVN repository, see “Check Out from SVN Repository” on
page 32-24. To clone an existing remote Git repository, see “Clone from Git Repository”
on page 32-36.
(^1) Right-click in the white space (any blank area) of the MATLAB Current Folder
browser. Select Source Control > Manage Files.
2 In the Manage Files Using Source Control dialog box, in the Source control
integration list:
- For an SVN repository, select SVN.
- For a Git repository, select Git.
3 Click the Change button to open the Specify SVN Repository URL dialog box if you
are using SVN or the Select a Repository dialog box if you are using Git.
If you are using Git, you can change the repository URL after the repository is
created. In the Current Folder browser, in a folder under source control, right-click
and select Source Control > Remote and specify a new URL.
4
Click the Create a repository button to create a repository on disk.
(^5) Select an empty folder or create a new folder in which you want to create the
repository and click Select Folder to create the repository.
Create New Repository