The "remote" command helps you to manage connections to remote repositories.
It allows you to show which remotes are currently connected, but also to add new connections or remove existing ones.
Shows URLs of remote repositories when listing your current remote connections. By default, listing remote repositories only shows you their shortnames (e.g. "origin"). Using the "-v" option, you will also see the remote's URLs in listings.
add <shortname> <url>
Creates a new connection to a remote repository. The "shortname" you provide can later be used instead of the URL when referencing the remote. A typical default shortname is "origin": this is used for the remote which your local repository was cloned from.
Disconnects the remote from the local repository. Note that this will have no effect on the actual remote repository (i.e. the repository itself is not removed / deleted / etc.).
rename <old-name> <new-name>
Renames the remote connection.
The Git Cheat Sheet
No need to remember all those commands and parameters: get our popular "Git Cheat Sheet" - for free!
Use the "add" parameter if you want to connect a new remote repository, in this example named "production":
$ git remote add production https://firstname.lastname@example.org/test/example.git
Easily Manage Your Remote Repositories
The Tower Git client allows you to manage all of your remote repositories (on GitHub, GitLab, Bitbucket, Azure DevOps and more) right from your desktop. Once you've connect your accounts, cloning and creating remote repositories is just a single click away:
Try it free for 30 days and see why 100,000 developers all over the world use Tower to be more productive with Git!