Opentopia Directory Encyclopedia Tools

Git (software)

Encyclopedia : G : GI : GIT : Git (software)



 

Git is a revision control file system project begun by Linus Torvalds to manage the Linux kernel and now maintained by Junio Hamano. It is free software, released under the GNU General Public License version 2. Originally designed only as a low-level engine that others could use to write front ends such as Cogito or StGIT, the core Git project has since become a complete revision control system that is usable directly. It is targeted to run on Linux, but is perfectly usable on other Unix-like operating systems (like BSD, Solaris and Darwin). Git has been made to work under MS Windows using cygwin, but it is noticeably slower, due to its heavy use of file system features that are particularly fast on Linux.

Unique characteristics

Git's design is a synthesis of Torvalds' intimate knowledge of maintaining a large distributed development project, and of file system performance. Combined with his urgent need to produce a working system in short order, these factors led to following characteristics: One property of Git that has led to considerable controversy is that it snapshots directory trees of files. The earliest systems for tracking versions of source code, SCCS and RCS, worked on individual files and emphasized the space savings to be gained from delta encoding the (mostly similar) versions. Later revision control systems maintained this notion of a file having an identity across multiple revisions of a project.

Git rejects this concept and does not explicitly record file revision relationships at any level below the source code tree. This has the consequence that:

Additionally, people are sometimes upset by the storage model:

Early history

Git development began after many kernel developers were forced to give up access to the proprietary BitKeeper system (see "Zero-cost BitKeeper for Linux and other open source projects"). The ability to use BitKeeper as freeware had been withdrawn by the copyright holder Larry McVoy after he claimed Andrew Tridgell had reverse engineered the BitKeeper protocols in violation of the BitKeeper license. The development of Git began on April 6, 2005, and proceeded very rapidly. The first merge of multiple branches was done on April 18, 2005, and two months later (June 16, 2005), the kernel 2.6.12 release was managed by Git.

Linus wanted a distributed system that he could use like BitKeeper, but none of the available free systems met his needs, particularly his performance needs. From an e-mail he wrote on April 7, 2005 while writing the first prototype:

Linus achieved his performance goals; on April 29, 2005, the nascent Git was benchmarked recording patches to the Linux kernel tree at the rate of 6.7 per second.

He developed the system until it was usable by technical users, then turned over maintenance on July 26, 2005 to Junio Hamano, a major contributor to the project. Junio was responsible for the 1.0 release on December 21, 2005. As of July 2006, the current release is 1.4.1.

Implementation

Like BitKeeper, Git does not use a centralized server. However, Git's primitives are not inherently a SCM system. Torvalds explains,

(Note that his opinion has changed since then.)

Git has two data structures, a mutable index that caches information about the working directory and the next revision to be committed, and an immutable, append-only object database containing four types of objects:

The object database can hold any kind of object. An intermediate layer, the index, serves as connection point between the object database and the working tree.

Each object is identified by a SHA1 hash of its contents. Git computes the hash, and uses this value for the object's name. The object is put into a directory matching the first two characters of its hash. The rest of the hash is used as the file name for that object.

Git stores each revision of a file as a unique blob object. The relationships between the blobs can be found through examining the tree and commit objects. Newly added objects are stored in their entirety using zlib compression. This can consume a large amount of hard disk space quickly, so objects can be combined into packs, which use delta compression to save space, storing blobs as their changes relative to other blobs.

Using Git

Git is quite easy to use, a selection of basic commands is given below (for a complete list, see the [GIT manpages]):

Related projects

Projects built on top of Git Web interfaces History visualization

Projects that use Git

Aside from the Linux kernel and many of its related projects, notable users of Git[link] include:

References

External links

  1. redirect[[Template:Portal]]

 


From Wikipedia, the Free Encyclopedia. Original article here. Support Wikipedia by contributing or donating.
All text is available under the terms of the GNU Free Documentation License See Wikipedia Copyrights for details.


Search Titles
0123456789
ABCDEFGHIJ
KLMNOPQRST
UVWXYZ?

E-mail this article to:

Personal Message: