Ad space (banner)
🌿Git Lessons
Lesson 11 / 59

Remote Repositories and git remote

This lesson covers the basics of remote repositories and the git remote command. It's for anyone searching "git remote usage."

A remote repository is a repository hosted on a server, like GitHub, meant to be shared by a team. The git remote command manages the relationship between your computer and that remote repository.

In Try It, run git remote add origin https://example.com/my-repo.git. This registers a remote repository at the given URL, under the name origin.

A common early mistake is misunderstanding the name origin — it's just a conventional name, essentially a "nickname" for referring to the remote repository, and understanding that makes it much less mysterious. In real teams, hosting the remote repository on a service like GitHub or GitLab, and having every team member exchange code through it, is the standard development style.

Git
Try it (type this into the pseudo terminal)
git remote add origin https://example.com/my-repo.git

🧑‍💻 You can type this command into the Git pseudo terminal to try it yourself (this page itself has no interactive terminal).

Ad space (banner)
Ad space (in-article)