主要内容

MATLAB 中的 Git

R2026b
使用 MATLAB® 中的 Git™ 源代码管理来管理您的文件并与其他人协作

使用 MATLAB 中的 Git 源代码管理来管理文件和分支,并与其他人协作。

有关在软件开发过程中使用 Git 源代码管理的详细信息,请参阅Develop and Share Software in MATLAB。

函数

全部展开

gitclone克隆 Git 仓库 (自 R2023b 起)
gitrepo创建 Git 仓库对象 (自 R2023b 起)
gitinitInitialize empty Git repository (自 R2023b 起)
matlab.git.GitRepositoryGit repository object (自 R2023b 起)
add将新文件标记为要添加到 Git 仓库 (自 R2023b 起)
rm将文件标记为从 Git 仓库删除 (自 R2023b 起)
status Display status of files in working folder and staging area in Git repository (自 R2023b 起)
log显示 Git 仓库中的提交记录 (自 R2023b 起)
discardChanges放弃 Git 仓库中的更改 (自 R2024a 起)
diffCommitsList modified files between two commits (自 R2025a 起)
saveFileRevisionSave revision of file to disk (自 R2025a 起)
addRemoteAdd new remote to Git repository (自 R2025a 起)
removeRemoteRemove remote from Git repository (自 R2025a 起)
createBranchCreate new Git branch (自 R2023b 起)
switchBranch切换 Git 分支 (自 R2023b 起)
deleteBranch删除本地 Git 分支 (自 R2023b 起)
mergeMerge Git branch, revision, or tag into current branch (自 R2023b 起)
fetch从远程 Git 仓库下载新数据 (自 R2023b 起)
mergeMerge Git branch, revision, or tag into current branch (自 R2023b 起)
pull从远程 Git 仓库下载新数据并将其合并到本地仓库 (自 R2023b 起)
commit将更改提交到 Git 仓库 (自 R2023b 起)
pushPublish local changes to remote Git repository (自 R2023b 起)

工具

分支管理器View Git repository history and manage local and remote Git branches and repositories (自 R2025a 起)

主题

精选示例

教学资源