Higher-level remote management helpers that compose lower-level Git functions.
Provides convenience functions for listing, adding, removing, and updating git remotes.
All functions accept an optional keyword list. Use :config to specify the
repository via a Git.Config struct; when omitted a default config is built
from the environment.
Summary
Functions
Adds a remote.
Lists remotes with their URLs.
Prunes stale remote-tracking branches for a remote.
Removes a remote.
Updates the URL of an existing remote.
Functions
Adds a remote.
Uses Git.remote(add_name: name, add_url: url).
Returns {:ok, :done} on success.
@spec list_detailed(keyword()) :: {:ok, [Git.Remote.t()]} | {:error, term()}
Lists remotes with their URLs.
Delegates to Git.remote/1 which returns verbose output by default.
Returns {:ok, [Git.Remote.t()]}.
Prunes stale remote-tracking branches for a remote.
Uses Git.fetch(remote: name, prune: true).
Returns {:ok, :done} on success.
Removes a remote.
Uses Git.remote(remove: name).
Returns {:ok, :done} on success.
Updates the URL of an existing remote.
Uses git remote set-url via raw System.cmd since the command module
does not expose a set-url option.
Returns {:ok, :done} on success.