From the course: Git Essential Training

Unlock this course with a free trial

Join today to access over 24,600 courses taught by industry experts.

Git to collaborate

Git to collaborate

- [Instructor] We have already seen how Gits can be used to share code, but let's take it a step further. How can we collaborate on the code, so work on it together? Let's look at an example. On the left, we have our own computer. We are working on a file, and we have added that file to the Git provider so that it is available there. On the right is our coworker or our friend who also wants to work on this file. They also use Git, and get their own copy of the file. They make changes to the file, and create a new version. When they're done, they push it back to the Git provider. At this stage, we can pull the code from the Git provider, and now we have access to that new version of the file. So we can both work on the file, and get the newest version, and see what other people have changed. Now, what would happen if we both start working on the file at the same time? The great thing about Git is that often it will understand how the file is structured, and unless there are changes…

Contents