Main Content

Git in MATLAB

Use Git™ source control in MATLAB® to manage your files and collaborate with others

Use Git source control in MATLAB to manage files and branches, and collaborate with others.

Functions

expand all

gitcloneClone Git repository (Since R2023b)
gitrepoCreate Git repository object (Since R2023b)
gitinitInitialize empty Git repository (Since R2023b)
matlab.git.GitRepositoryGit repository object (Since R2023b)
addMark new file for addition to Git repository (Since R2023b)
rmMark file for deletion from Git repository (Since R2023b)
status Display status of files in working folder and staging area in Git repository (Since R2023b)
logDisplay record of commits in Git repository (Since R2023b)
discardChangesDiscard changes in Git repository (Since R2024a)
diffCommitsList modified files between two commits (Since R2025a)
saveFileRevisionSave revision of file to disk (Since R2025a)
addRemoteAdd new remote to Git repository (Since R2025a)
removeRemoteRemove remote from Git repository (Since R2025a)
createBranchCreate new Git branch (Since R2023b)
switchBranchSwitch Git branch (Since R2023b)
deleteBranchDelete local Git branch (Since R2023b)
mergeMerge Git branch, revision, or tag into current branch (Since R2023b)
fetchDownload new data from remote Git repository (Since R2023b)
mergeMerge Git branch, revision, or tag into current branch (Since R2023b)
pullDownload and merge new data from remote Git repository into local repository (Since R2023b)
commitCommit changes to Git repository (Since R2023b)
pushPublish local changes to remote Git repository (Since R2023b)

Tools

Branch ManagerView Git repository history and manage local and remote Git branches and repositories (Since R2025a)

Topics

Featured Examples