Working with remotes

Git is a tool for versioning files, as you know, but it has been built with collaboration in mind. In 2005, Linus Torvalds had the need for a light and efficient tool to share the Linux kernel code, allowing him and hundreds of other people to work on it without going crazy; the pragmatism that guided its development gave us a very robust layer for sharing data among computers, without the need of a central server.

Basically, a Git remote is another "place" that has the same repository you have on your computer. As shown in the following image, you can think of it as different copies of the same repository that can exchange data between themselves:

So, a remote Git repository is just a remote copy of the same Git repository we created locally; if you have access to that remote via common protocols such as SSH, the custom git:// protocol, or other protocols, you can keep in sync your modification with it.

Even another folder in your computer can act as a remote: for Git, the filesystem is a communication protocol like any other, and you are allowed to use it if you like.

This is what we will do to grasp the basic concepts about remotes.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.120.109