Git branching

When using Git, it is very easy and cheap to create new branches – they're just pointers (a SHA-1 ID) to a specific commit. You create them on the fly, and that is how it should be, especially in agile development and with many collaborating developers. 

The following diagram illustrates how Git uses branching:

Notice the hash values shown in the preceding objects (98ce9, 22ca2, and f23ae) – these are the SHA values that uniquely identify a commit.

CVS also uses branches, but because it is file-based, a new branch gets you a copy of all the files in a new directory, which is much less efficient. This situation is depicted in the following diagram:

The way branches and file structures are handled is one of the most fundamental differences between these two systems.

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

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