Using Git for Collaboration

Learn how Git can be used to share work between multiple programmers in a project.

We'll cover the following

Collaborating with Git

Previously, we learned how we can use version control with Git on our local machine. Now, let’s see how we can use it to collaborate with other programmers who are working on the same project as us. For that, we’ll need not only our local repository but also a central repository that we can use to update the others about the changes we make.

Let’s assume that Alice and Bob are both working on the same project and want to use Git to update each other on the changes they make to any files in the project. They will not only have their local Git repositories, as we saw in the example in the previous lesson, but they’ll also connect to a centralized repository. Any changes they make can now be pushed to this repository, and they can also pull down any changes the other person made from that repository.

This will look something like the following:

Get hands-on with 1200+ tech skills courses.