R: Remove a remote

remote_remove {git2r} | R Documentation

## Remove a remote

### Description

All remote-tracking branches and configuration settings for the remote will be removed.

### Usage

    remote_remove(repo, name)

    ## S4 method for signature 'git_repository,character'
    remote_remove(repo, name)

### Arguments

`repo` | The repository to work on
`name` | The name of the remote to remove

### Value

NULL, invisibly

### Examples

    ## Not run:
    ## Initialize a temporary repository
    path <- tempfile(pattern="git2r-")
    dir.create(path)
    repo <- init(path)

    ## Create a user and commit a file
    config(repo, user.name="Alice", user.email="alice@example.org")
    writeLines("Hello world!", file.path(path, "example.txt"))
    add(repo, "example.txt")
    commit(repo, "First commit message")

    ## Add a remote
    remote_add(repo, "playground", "https://example.org/git2r/playground")
    remotes(repo)
    remote_url(repo, "playground")

    ## Rename a remote
    remote_rename(repo, "playground", "foobar")
    remotes(repo)
    remote_url(repo, "foobar")

    ## Remove a remote
    remote_remove(repo, "foobar")
    remotes(repo)

    ## End(Not run)

[Package git2r version 0.21.0 Index]