This is the second chapter (of four) on Git collaboration. In chapter 11, you learned about cloning. In this one, you’ll learn about remotes and the command that manipulates them, git remote. Each clone that you create contains a reference to where it came from. This reference is a remote. Remotes serve as pointers back to a location, either on your computer or on the Internet. It’s the basis for collaboration, along with cloning.
You’ll learn how git remote allows you to examine and update the remote. You’ll also learn about the git ls-remote command, which lets you know if your local repository and your original (remote) repository are out of sync. This chapter will help you understand Git’s collaboration model, and will make the next two chapters on git push and git pull clearer.
In figure 12.1, you have three repositories: math.clone, math.bob, and math.carol. All of these repositories are created from the math.git repository, which is a bare directory.
In your collection of repositories, each clone in the second row (math.clone, math.bob, and math.carol) is created by git clone, using math.git as the source. Each clone contains a reference to math.git. This reference, called a remote, indicates the location of the original repository.