Configure Source Control Settings
Use the general source control settings in MATLAB® to specify the default location of new Git™ and SVN working folders and disable MathWorks® source control integration.
On the Home tab, in the Environment section, click Settings. Select MATLAB > Source Control. Then, configure your settings.
To configure Git-specific source control settings, see Configure Git Settings.
Setting | Usage | |
---|---|---|
Source Control Integrations | MATLAB source control integration, accessible through the Files and Project panels, is enabled by default. To disable MATLAB source control integration, clear Enable source control. When you disable source control,
MATLAB does not destroy repository information. For example, it
does not remove the | |
If you want to use other source control tools such as Perforce® P4V with MATLAB instead of the built-in source control integration, write your own source control integration using the Software Development Kit (SDK) available on File Exchange. Then, ensure that you select Enable 3rd-party source control integrations (requires Java). For more information, see Write a Source Control Integration with the SDK. | ||
Files | To configure MATLAB to prompt you about unsaved changes before performing source control actions such as commit, merge, SVN update, and Git branch switch, select Check for unsaved files before source control operations. | |
By default, MATLAB and Simulink® reload files modified by source control operations, such as SVN update, and Git branch switch. To disable this behavior, clear the Reload files modified by source control operations check box. | ||
New Working Folder | When you interactively clone or check out a working copy from a repository, by default, MATLAB downloads files into the currently opened folder. To use a folder of your choice, select Use specified folder and specify the folder by using the browser or pasting the path. |
Configure Git Settings
Use the Git source control settings to specify your username and email, remember credentials for the current MATLAB session, and enable SSH authentication.
On the Home tab, in the Environment section, click Settings. Select MATLAB > Source Control > Git. Then, configure your settings.
Setting | Usage | |
---|---|---|
User | Specify your username and email in the Name and
Email fields. Doing so sets the value of
user.name and user.email in
your global Git configuration file. | |
MATLAB Git integration is configured by default to Generate local avatars using your initials. An avatar appears next to your username and email in the Branch Manager and when you annotate lines for files under Git source control in the MATLAB Editor. To enable MATLAB to retrieve globally-recognized avatars from web services such as gravatar.com, select Retrieve avatars from web services instead. To disable the usage of avatars altogether, select None instead. | ||
Credentials | By default, MATLAB Git integration remembers usernames and tokens when you interact with Git repositories. Persist credentials is the default selection. To configure MATLAB to remember Git credentials only in the current session, select Remember credentials for the current MATLAB session. To disable the credential management altogether, select Disable credential management instead. | |
SSH | To enable the use of SSH keys, select Enable SSH. By default, MATLAB looks for keys in the agent. On Windows®, use OpenSSH as the SSH agent. To install OpenSSH, see Get started with OpenSSH for Windows. | |
If you are not using an SSH agent to store your keys, you can enter them manually.
In MATLAB Online™, SSH authentication is disabled by default. Using SSH keys in MATLAB Online requires you to store the public and private key files on MATLAB Drive. | ||
To enable the use of a pass-phrase and receive a prompt once per session, select Key is pass-phrase protected. | ||
Proxy | To enable the use of a proxy, select Enable
proxy. Then, specify the proxy you want to use in the
Proxy host field. Doing so sets the value
of | |
Commit Signing | To enable signing commits automatically, select Sign commits.
When MATLAB verifies a commit signature, a green verification icon
| |
Branch Manager | To control the number of commits that the Branch Manager shows, specify the Maximum number of commits to show. | |
Environment | To enable MATLAB to use user-defined Git environment variables, select If defined, use Git environment variables. This setting is not available in MATLAB Online. | |
Windows | To use Git LFS, Git hooks, a credential helper, or Simulink automerge on Windows, you must install a command-line Git client and follow steps described in Additional Setup.
| |
To enable support for long paths on a Windows system, select Enable support for long
paths. Doing so sets the value of
core.longpaths to true in your
global Git configuration file. |
Configure SVN Settings
MATLAB SVN integration remembers usernames and tokens when you interact with SVN repositories.
Use the SVN source control settings to adjust or disable credential management.
On the Home tab, in the Environment section, click Settings. Select MATLAB > Source Control > SVN.
In the Credentials section, select from the available options.
The Persist credentials option is the default selection.
To configure MATLAB to remember SVN credentials only in the current session, select Remember credentials for the current MATLAB session.
To disable the credential management altogether, select Disable credential management instead.