工程中的源代码管理
配置源代码管理、检索文件、审核更改内容、提交已修改文件
通过工程,您可以查找所需的文件、管理并共享文件和设置以及与源代码管理进行交互,从而有助于您组织大型建模工程。观看使用工程来协作、跟踪和合并更改并执行代码审查(4 分 50 秒),并参阅什么是工程?和About Source Control with Projects。
函数
主题
源代码管理设置
- About Source Control with Projects
What source control tools and workflows can I use in a project? Try built-in Git™ or SVN, or integrate third-party tools. - Add a Project to Source Control
Add Git or SVN source control to your project. - 用源代码管理工具注册模型文件
将模型文件注册为二进制文件。 - 设置 Git 源代码管理
设置 Git 源代码管理以在 MATLAB® 中使用,包括注册二进制文件以避免文件损坏,以及设置 SSH 身份验证以防止频繁的登录提示。 - Automatically Merge Models
Enable MATLAB Git integration to automatically merge model files. - Create New GitHub Repository
Create an empty remote GitHub® repository. - 在 GitHub 上共享工程
要共享您的工程,请在 GitHub 上使您的工程公开可用。 - Add Git Submodules
Clone an external Git repository as a submodule. - 设置 SVN 源代码管理
配置 SVN、注册模型文件、锁定文件、共享存储库以及管理 SVN 外部引用。 - Disable Source Control
Disable source control to prepare a project template. - Change Source Control
Archive a project and create a new one with a different source control. - Write a Source Control Integration with the SDK
Use the Software Development Kit (SDK) to integrate projects with third-party source control tools. - Set Source Control Preferences
Disable a source control system and set Git preferences in MATLAB Online™. - Continuous Integration Using MATLAB Projects and Jenkins
Set up your project for CI in Jenkins and reduce test suite runtime using dependency cache. - 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.
检索和签出
- Clone Git Repository
Retrieve a working copy of a project from Git source control. - Check Out SVN Repository
Retrieve a working copy of a project from SVN source control. - Tag and Retrieve Versions of Project Files
With SVN, tag specific revisions of a project. - Refresh Status of Project Files
Check for locally modified project files. - Check for Modifications
Find out if the repository version has moved ahead. - Update Revisions of Project Files
Update revisions with Git or SVN. - Get SVN File Locks
With SVN, ensure users get locks on model files before editing.
审核更改内容、提交已修改文件
- View Modified Files
Examine changes in the project. - Compare Revisions
Review changes in modified files by comparing with ancestors, or compare particular revisions. - Run Project Checks
Check projects for problems such as unsaved changes, files not under source control, or derived files out-of-date. - Commit Modified Files to Source Control
Commit a change set to the local Git repository or SVN repository. - Revert Changes
Discard local changes or choose a revision for a file or the whole project. - 使用 Git 拉取、推送和提取文件
用于提取、合并更改和将更改推送到远程存储库的 Git 工作流。 - Branch and Merge Files with Git
Create, switch, merge, revert, and delete branches. - Resolve Conflicts
Locate and resolve conflicts; merge text files and merge models; extract conflict markers. - Determine Order for Resolving Conflicts Using Dependency Analyzer
Use the Dependency Analyzer to determine the resolve merge conflicts order in a project. - Work with Derived Files in Projects
Best practices for derived files, such as.mex
andslprj
files.