class Git::Remote

A remote in a Git repository

Remote objects provide access to remote metadata and operations like fetch, merge, and remove. This class and ‘Git::Repository#remote`, which returns it, are both deprecated: read remote configuration through {Git::Repository::RemoteOperations#remote_list} and call the repository-level operations with the remote name instead.

@example Reading a remote and fetching from it without Git::Remote

git = Git.open('.')
origin = git.remote_list.find { |r| r.name == 'origin' }  #=> Git::RemoteInfo
origin.url.first
git.fetch(origin.name)

@deprecated Use {Git::Repository::RemoteOperations#remote_list} and the

repository-level remote operations instead

{Git::Repository::RemoteOperations#remote_list} returns immutable
{Git::RemoteInfo} value objects. Operations that lived on this class are
called on the repository with the remote name instead (for example
{Git::Repository::RemoteOperations#fetch} and
{Git::Repository::RemoteOperations#remote_remove}). Constructing a
`Git::Remote` emits a deprecation warning.

@api public