Remote repositories allow you to share changes from or to your repository. Remote locations are generally a build server, a team members machine or a centralised store such as Github.com. Remotes are added using the git remote
command with a friendly name and the remote location, typically a HTTPS URL or a SSH connection for example https://github.com/OcelotUproar/ocelite.git or [email protected]:/OcelotUproar/ocelite.git.
The friendly name allows you to refer to the location in other commands. Your local repository can reference multiple different remote repositories depending on your scenario.
Task
This environment has a remote repository location of /s/remote-project/1. Using git remote
, add this remote location with the name origin.
Protip
If you use git clone
, discussed in a future scenario, then the location you're cloning from will be automatically added as a remote with the name origin.