Documentation

This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

我们为许可用户提供了部分翻译好的中文文档。您只需登录便可查阅这些文档

Source Control Integration

Interface MATLAB® with source control system

Topics

General Source Control

About MathWorks Source Control Integration

Use MATLAB to work with files under source control. You can perform operations such as update, commit, merge changes, and view revision history directly from the Current Folder browser.

Select or Disable Source Control System

MathWorks® source control integration is on by default. You can select or disable a source control system.

Customize External Source Control to Use MATLAB for Diff and Merge

Use the MATLAB Comparison Tool for diff and merge from external source control tools.

Subversion (SVN)

Check Out from SVN Repository

Create a new local copy of a repository by retrieving files from source control.

Create New Repository

To add version control to files not currenlty under source control, create a new repository.

Set Up SVN Source Control

MATLAB provides built-in SVN integration.

You can use tags to identify specific revisions of all files and configure SVN to make files with specified extensions read only.

Mark Files for Addition to Source Control

When you create a new file in a folder under source control, mark the file for addition to source control.

Move, Rename, or Delete Files Under Source Control

Move, rename, or delete files using the MATLAB Source Control context menu options or another source control client application.

Update SVN File Status and Revision

Refresh the source cotnrol status of files, and update local copies of files.

Get SVN File Locks

It is good practice to get a file lock before editing a file. The lock tells other users that the file is being edited, and you can avoid merge issues.

Review Changes in Source Control

Browse thie history of a file, or compare file revisions.

Commit Modified Files to Source Control

After you review changes and mark any new files for addition into source control, you can commit your files.

Resolve Source Control Conflicts

If a conflict message appears when you try to commit files, examine and resolve conflicts.

Revert Changes in Source Control

Remove local changes in a file or revert a file to a specified revision.

Git

Clone from Git Repository

Clone a remote Git™ repository to retrieve repository files.

Create New Repository

To add version control to files not currenlty under source control, create a new repository.

Set Up Git Source Control

Git integration with MATLAB provides distributed source control with support for creating and merging branches. If you want to use Git to merge branches in MATLAB, you must also install a command-line Git client. If you use third-party source control tools, you must register your binary files to avoid file corruption.

Mark Files for Addition to Source Control

When you create a new file in a folder under source control, mark the file for addition to source control.

Move, Rename, or Delete Files Under Source Control

Move, rename, or delete files using the MATLAB Source Control context menu options or another source control client application.

Update Git File Status and Revision

Refresh the source cotnrol status of files in the repository, and fetch updates of files in a repository.

Review Changes in Source Control

Browse thie history of a file, or compare file revisions.

Commit Modified Files to Source Control

After you review changes and mark any new files for addition into source control, you can commit your files.

Resolve Source Control Conflicts

If a conflict message appears when you try to commit files, examine and resolve conflicts.

Branch and Merge with Git

Create, merge, and delete branches, or switch to another branch.

Push and Fetch with Git

Use this workflow to work with a remote repository. With Git, there is a two-step workflow: commit local changes, and then push to the remote repository.

Revert Changes in Source Control

Remove local changes in a file or revert a file to a specified revision.

Was this topic helpful?