Git is a revision control filesystem project started by Linus Torvalds to manage the Linux kernel. It is free software released under the GNU General Public License version 2.
The development of Git began on April 7, 2005, and two months later, kernel 2.6.12 was released being managed by Git. Git development began after many kernel developers were forced to give up access to the proprietary BitKeeper system (see especially BitKeeper#BitKeeper, Linux and the free version for open source projects). Permission to use BitKeeper as freeware had been withdrawn by proprietor Larry McVoy after Andrew Tridgell attempted to reverse engineer the BitKeeper protocols.
Like BitKeeper, Git does not use a centralized server. However, Git is not a SCM system. Torvalds explains, in many ways you can just see git as a filesystem it s content-addressable, and it has a notion of versioning, but I really really designed it coming at the problem from the viewpoint of a filesystem person (hey, kernels is what I do), and I actually have absolutely zero interest in creating a traditional SCM system.
Git has two data structures, a directory cache and an object database containing four types of objects:
A blob object is the content of a computer file.
A tree object is a list of blob objects and any information associated with each blob object, such as the file name and file file system permissions. This object describes the source tree at a certain time.
A commit object provides the history of the source tree. It contains a log message, a tree object, and pointers to one or more parent commit objects.
A tag object is a container that can hold meta-data related to another object. Most commonly it is used to store a digital signature of a commit object corresponding to a particular release of the data being tracked by Git.
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 distinguished by a SHA hash functions hash of its contents. Git computes the hash, and uses this value for the object s filename. 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 commit objects. Normally a blob is stored in its 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 (storing blobs as their changes relative to other blobs).
Git has the following commands among others (for a complete list, see the [http://www.kernel.org/pub/software/scm/git/docs/ GIT manpages]):
git-init-db creates a new repository.
git-update-cache --add adds new blob objects to the object database for any file that has been changed since the last commit. The old blob objects are left intact.
git-write-tree creates a new tree object from the directory cache and adds it into the object database. It outputs the hash of the tree object.
git-commit-tree takes in the hash of a tree object and the hashes of the parent commit objects. It will create a new commit object.
Petr Baudis maintains a set of scripts called [http://www.kernel.org/pub/software/scm/cogito cogito] (formerly git-pasky ), a revision control system that uses Git as its backend.
As of April 2005, there are two web interfaces for Git:
[http://www.kernel.org/git/gitweb.cgip=linux/kernel/git/torvalds/linux-2.6.git;a=log gitweb] – a Perl implementation maintained by Kay Sievers.
[http://www.grmso.net:8090/ wit] – a Python programming language implementation maintained by Christian Meder.
= External links =
[http://git.or.cz/ GIT homepage], maintained by Petr Baudis
[http://www.kernel.org/git/p=git/git.git;a=blob;f=Documentation/tutorial.txt GIT tutorial]
[http://www.kernel.org/pub/software/scm/git/docs/ GIT manpages]
[http://www.kernel.org/git/ git] - the project page at kernel.org
[http://www.kernel.org/git/p=git/git.git;a=tree source code]
[http://www.kerneltraffic.org/git/index.html Git Traffic] – Newsletter that summarises events on the git mailing list
[http://lwn.net/Articles/131657/ The guts of git], article by LWN.net
From KernelTrap:
[http://kerneltrap.org/node/4982 Managing the Kernel Source With git ]
[http://kerneltrap.org/node/4998 Continued git Development]
[http://kerneltrap.org/node/5003 Beginner s Guide To Git]
[http://kerneltrap.org/node/5014 Importing The Kernel Into git, Merging]
[http://kerneltrap.org/node/5026 Git Web Interfaces]
[http://www.gelato.unsw.edu.au/archives/git/0505/2971.html Re: (PATCH) add the ability to create and retrieve delta objects]
*[
http://www.pcworld.idg.com.au/index.php/id;1852076002;fp;16;fpid;0 PC World] – Torvalds seemed aware that his decision to drop BitKeeper would also be controversial. When asked why he called the new software, git, British English slang meaning a rotten person, he said. I m an egotistical bastard, so I name all my projects after myself. First Linux, now git.
[http://www.git-source.org New website for Git]
[http://linux.yyz.us/git-howto.html Kernel Hackers Guide to git]