How To Add New Remote On Git

at in tips

A remote is a common repository used by a team to exchange their work.

In the case of cloning an existing project, it will already come with the remote populated for you with the default name which is origin. But if you just created a new repository locally it is very likely that you will eventually want to send your work to a remote.

To do so you need to add a new remote, and you can do with a command like this:

git remote add remote-name remote-URL
  • remote-name : The name your remote will be given, locally, if it’s the only remote in your repository use the default name origin.
  • remote-URL: The URL of your remote repository.

To check which remotes you already have before adding a new one check here

See Also