mediagit remote
Manage remote repository connections.
Synopsis
mediagit remote add <NAME> <URL> [--fetch]
mediagit remote remove <NAME>
mediagit remote list [--verbose]
mediagit remote rename <OLD> <NEW>
mediagit remote set-url <NAME> <URL>
mediagit remote show <NAME>
Description
Manages the set of remotes whose branches you track. Remote URLs are stored in
.mediagit/config.toml.
Subcommands
add
Add a new remote.
mediagit remote add <NAME> <URL>
Options:
-f,--fetch— Immediately fetch from the new remote after adding
remove
Remove a remote and all its tracking refs.
mediagit remote remove <NAME>
Alias: rm
list
List all configured remotes.
mediagit remote list [--verbose]
Options:
-v,--verbose— Show URLs alongside remote names
rename
Rename a remote.
mediagit remote rename <OLD-NAME> <NEW-NAME>
set-url
Change the URL of an existing remote.
mediagit remote set-url <NAME> <NEW-URL>
show
Show detailed information about a remote.
mediagit remote show <NAME>
Examples
Add a remote
$ mediagit remote add origin http://media-server.example.com/my-project
Add a remote and fetch immediately
$ mediagit remote add upstream http://media-server.example.com/upstream --fetch
List remotes
$ mediagit remote list
origin
upstream
$ mediagit remote list --verbose
origin http://media-server.example.com/my-project (fetch)
origin http://media-server.example.com/my-project (push)
upstream http://media-server.example.com/upstream (fetch)
upstream http://media-server.example.com/upstream (push)
Rename a remote
$ mediagit remote rename origin production
Change URL
$ mediagit remote set-url origin https://new-server.example.com/my-project
Remove a remote
$ mediagit remote remove old-server
Configuration
Remotes are stored in .mediagit/config.toml:
[remotes.origin]
url = "http://media-server.example.com/my-project"
[remotes.backup]
url = "http://backup-server.example.com/my-project"
Exit Status
- 0: Success
- 1: Remote not found or URL invalid
See Also
- mediagit fetch - Fetch from a remote
- mediagit push - Push to a remote
- mediagit pull - Fetch and merge from remote
- mediagit clone - Clone a remote repository