MATLAB ヘルプ センター
Git リポジトリ オブジェクトの作成
R2023b 以降
repo = gitrepo
repo = gitrepo(folder)
repo = gitrepo は、現在の作業フォルダーにある Git™ リポジトリ用の matlab.git.GitRepository オブジェクト repo を作成します。repo を使用して、リポジトリをプログラムで操作できます。
repo
matlab.git.GitRepository
例
repo = gitrepo(folder) は、指定した folder にある Git リポジトリ用の matlab.git.GitRepository オブジェクト repo を作成します。
folder
すべて折りたたむ
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) Remotes: [1×1 GitRemote] 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] Remotes: [1×1 GitRemote] (origin https://github.com/my/repo ModifiedFiles: [0×1 string] UntrackedFiles: [2×1 string] IsBare: 0 IsShallow: 0 IsDetached: 0 IsWorktree: 0
関数が matlab.git.GitRepository オブジェクトを作成するリポジトリ フォルダーのパス。文字ベクトルまたは string スカラーとして指定します。
Git リポジトリ。matlab.git.GitRepository オブジェクトとして返されます。
R2023b で導入
gitinit | gitclone | add | rm | commit
gitinit
gitclone
add
rm
commit
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の MathWorks のサイトは、お客様の地域からのアクセスが最適化されていません。
南北アメリカ
ヨーロッパ
アジア太平洋地域
最寄りの営業オフィスへのお問い合わせ