gitrepo
说明
示例
为当前文件夹创建存储库对象
打开 Times Table App 工程存储库,并创建一个存储库对象。
openExample("matlab/TimesTableProjectExample")
repo = gitrepo
repo = GitRepository with properties: WorkingFolder: "C:\myWorkSpace\examples\TimesTableProjectExample" GitFolder: "C:\myWorkSpace\examples\TimesTableProjectExample\.git" CurrentBranch: [1×1 GitBranch] (main) LastCommit: [1×1 GitCommit] (566d916) ModifiedFiles: [0×1 string] UntrackedFiles: [1×1 string] IsBare: 0 IsShallow: 0 IsDetached: 0 IsWorktree: 0
为指定的文件夹创建存储库对象
为指定的文件夹创建一个存储库对象。
repo = gitrepo("newrepo\")
repo = GitRepository with properties: WorkingFolder: "C:\workSpace\newrepo" GitFolder: "C:\workSpace\newrepo\.git" CurrentBranch: [0×0 GitBranch] LastCommit: [0×0 GitCommit] ModifiedFiles: [0×1 string] UntrackedFiles: [2×1 string] IsBare: 0 IsShallow: 0 IsDetached: 0 IsWorktree: 0
输入参数
folder
— 文件夹路径
字符向量 | 字符串标量
函数在其中创建存储库的文件夹的路径,指定为字符向量或字符串标量。
输出参量
repo
— Git 存储库
matlab.git.GitRepository
对象
Git 存储库,以 matlab.git.GitRepository
对象形式返回。
版本历史记录
在 R2023b 中推出
MATLAB 命令
您点击的链接对应于以下 MATLAB 命令:
请在 MATLAB 命令行窗口中直接输入以执行命令。Web 浏览器不支持 MATLAB 命令。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)