Git Overview

Submitted by: Submitted by

Views: 47

Words: 262

Pages: 2

Category: Science and Technology

Date Submitted: 10/05/2014 08:32 PM

Report This Essay

Important aspect about Git is the repository.

Functionality of repository is:

Save the source code

Check where the source code is changed

Leave the record of what changes were made for the source code

For example, there is a “Hello World” program in the repository that outputs “Hello World”

Then there are two people working together on this same repository let's say they are: A and B

People A and B downloads “Hello World” program

People A modifies “Hello World” program to output “Bye World” and uploads it into the repository

People B modifies “Hello World” program to output “Hello World Cup” and tries to upload that program into the same repository.

Now, let's say they is no repository. If that is the case, B's “Hello World” program would overwrite A's “Hello World” program and A's program would be gone forever. The purpose of repository is to prevent such thing.

With repository, when B tries to upload his modified version of “Hello World” program, repository would give message “There is a source code which A modified, so you cannot upload”.

In order for B to upload his code, it must take it into the account of what A already uploaded and then make additional modification to upload. For example, if B wants to upload his program, he would need to download the A's program (which outputs “Bye World”) and then make an additional change on top of A's modification to upload (In this case, B would download A's program and add “Cup” after A's modification to make it “Bye World Cup”.).