Main Content

removeRemote

Remove remote from Git repository

Since R2025a

    Description

    removeRemote(repo,remote) removes the remote remote from the Git™ repository repo.

    example

    Examples

    collapse all

    Navigate to your repository folder and create a repository object.

    repo = gitrepo;

    Remove the remote fork.

    removeRemote(repo,"fork");
    

    Input Arguments

    collapse all

    Git repository, specified as a matlab.git.GitRepository object.

    Name or URL of the remote to remove, specified as a string scalar, a character vector, or a matlab.git.GitRemote object.

    Example: "origin", 'https://github.com/my/repo'

    Data Types: char | string

    Version History

    Introduced in R2025a