Git (software) - Wikipedia, the free encyclopedia

Git (software)

From Wikipedia, the free encyclopedia
Jump to: navigation, search
Git
Git logo
Original author(s) Linus Torvalds
Developer(s) Junio Hamano, Linus Torvalds
Stable release 1.7.2.2  (August 19, 2010; 14 days ago (2010-08-19))[1] [+/−]
Preview release 1.7.1.rc4  (April 11, 2010; 4 months ago (2010-04-11))[2] [+/−]
Written in C, Bourne Shell, Perl[3]
Operating system POSIX
Type Revision control
License GNU General Public License v2
Website http://git-scm.com/

Git is a distributed revision control system with an emphasis on speed. Git was initially designed and developed by Linus Torvalds for Linux kernel development.

Every Git working directory is a full-fledged repository with complete history and full revision tracking capabilities, not dependent on network access or a central server.

Git's current software maintenance is overseen by Junio Hamano. Distributed under the terms of version 2 of the GNU General Public License, Git is free software.

Contents

[edit] Name

Linus Torvalds has quipped about the name "git", which is British English slang for a stupid or unpleasant person:[4] "I'm an egotistical [sic] bastard, and I name all my projects after myself. First Linux, now git."[5][6] (This is especially ironic because Linus himself resisted choosing the name Linux for his operating system kernel.)

The official Git wiki also gives a number of alternative explanations and backronyms for the name, including "Global Information Tracker".[5]

[edit] Early history

Git development began after many Linux kernel developers chose to give up access to the proprietary BitKeeper system.[7] The ability to use BitKeeper free of charge had been withdrawn by the copyright holder Larry McVoy after he claimed Andrew Tridgell had reverse engineered the BitKeeper protocols in alleged violation of the BitKeeper license. At Linux.Conf.Au 2005, Tridgell demonstrated during his keynote that the reverse engineering process he had used was simply to telnet to the appropriate port of a BitKeeper server and type "help".[8]

Torvalds 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:[9]

However, the SCMs I've looked at make this hard. One of the things (the main thing, in fact) I've been working at is to make that process really efficient. If it takes half a minute to apply a patch and remember the changeset boundary etc. (and quite frankly, that's fast for most SCMs around for a project the size of Linux), then a series of 250 emails (which is not unheard of at all when I sync with Andrew, for example) takes two hours. If one of the patches in the middle doesn't apply, things are bad bad bad.

Now, BK wasn't a speed demon either (actually, compared to everything else, BK is a speed deamon [sic], often by one or two orders of magnitude), and took about 10–15 seconds per email when I merged with Andrew. HOWEVER, with BK that wasn't as big of an issue, since the BK<->BK merges were so easy, so I never had the slow email merges with any of the other main developers. So a patch-application-based SCM "merger" actually would need to be faster than BK is. Which is really really really hard.

So I'm writing some scripts to try to track things a whole lot faster. Initial indications are that I should be able to do it almost as quickly as I can just apply the patch, but quite frankly, I'm at most half done, and if I hit a snag maybe that's not true at all. Anyway, the reason I can do it quickly is that my scripts will not be an SCM, they'll be a very specific "log Linus' state" kind of thing. That will make the linear patch merge a lot more time-efficient, and thus possible.

(If a patch apply takes three seconds, even a big series of patches is not a problem: if I get notified within a minute or two that it failed half-way, that's fine, I can then just fix it up manually. That's why latency is critical—if I'd have to do things effectively "offline", I'd by definition not be able to fix it up when problems happen).

Torvalds had several design criteria:

  1. Take CVS as an example of what not to do; if in doubt, make the exact opposite decision. To quote Torvalds, speaking somewhat tongue-in-cheek:
    "For the first 10 years of kernel maintenance, we literally used tarballs and patches, which is a much superior source control management system than CVS is, but I did end up using CVS for 7 years at a commercial company [Transmeta[10]] and I hate it with a passion. When I say I hate CVS with a passion, I have to also say that if there are any SVN (Subversion) users in the audience, you might want to leave. Because my hatred of CVS has meant that I see Subversion as being the most pointless project ever started. The slogan of Subversion for a while was "CVS done right", or something like that, and if you start with that kind of slogan, there's nowhere you can go. There is no way to do CVS right."[11]
  2. Support a distributed, BitKeeper-like workflow
    "BitKeeper was not only the first source control system that I ever felt was worth using at all, it was also the source control system that taught me why there's a point to them, and how you actually can do things. So Git in many ways, even though from a technical angle it is very very different from BitKeeper (which was another design goal, because I wanted to make it clear that it wasn't a BitKeeper clone), a lot of the flows we use with Git come directly from the flows we learned from BitKeeper."[11]
  3. Very strong safeguards against corruption, either accidental or malicious[11][12]
  4. Very high performance

The first three criteria eliminated every pre-existing version control system except for Monotone, and the fourth excluded everything.[11] So, immediately after the 2.6.12-rc2 Linux kernel development release,[11] he set out to write his own.[11]

The development of Git began on April 3, 2005.[13] The project was announced on April 6,[14] and became self-hosting as of April 7.[13] The first merge of multiple branches was done on April 18.[15] Torvalds achieved his performance goals; on April 29, the nascent Git was benchmarked recording patches to the Linux kernel tree at the rate of 6.7 per second.[16] On June 16, the kernel 2.6.12 release was managed by Git.[17]

While strongly influenced by BitKeeper, Torvalds deliberately attempted to avoid conventional approaches, leading to a unique design.[18] 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.[19] Hamano was responsible for the 1.0 release on December 21, 2005,[20] and remains the project's maintainer.

[edit] Design

Git's design was inspired by BitKeeper and Monotone.[21][22] Git was originally designed as a low-level version control system engine on top of which others could write front ends, such as Cogito or StGIT.[22] However, the core Git project has since become a complete revision control system that is usable directly.[23]

[edit] Characteristics

Git's design is a synthesis of Torvalds's experience with Linux in maintaining a large distributed development project, along with his intimate knowledge of file system performance gained from the same project and the urgent need to produce a working system in short order. These influences led to the following implementation choices:

Strong support for non-linear development
Git supports rapid branching and merging, and includes specific tools for visualizing and navigating a non-linear development history. A core assumption in Git is that a change will be merged more often than it is written, as it is passed around various reviewers.
Distributed development
Like Darcs, BitKeeper, Mercurial, SVK, Bazaar and Monotone, Git gives each developer a local copy of the entire development history, and changes are copied from one such repository to another. These changes are imported as additional development branches, and can be merged in the same way as a locally developed branch.
Compatibility with existing systems/protocols
Repositories can be published via )." 
  • ^ "Git User's Manual - Git Concepts - Trust". 2006-10-18. http://www.kernel.org/pub/software/scm/git/docs/user-manual.html#trust. 
  • ^ Linus Torvalds. "Re: VCS comparison table". git mailing list. http://marc.info/?l=git&m=116118369005954. Retrieved 2009-04-10. , describing Git's script-oriented design
  • ^ iabervon (2005-12-22). "Git rocks!". http://lwn.net/Articles/165202/. , praising Git's scriptability
  • ^ "Git User's Manual". 2007-08-05. http://www.kernel.org/pub/software/scm/git/docs/user-manual.html#ensuring-reliability. 
  • ^ Linus Torvalds (2005-04-10). "Re: more git updates..". linux-kernel mailing list. http://marc.info/?l=linux-kernel&m=111314792424707. 
  • ^ Bruno Haible (2007-02-11). "how to speed up "git log"?". git mailing list. http://marc.info/?l=git&m=117119479505638. 
  • ^ Linus Torvalds (2006-03-01). "Re: impure renames / history tracking". git mailing list. http://marc.info/?l=git&m=114123702826251. 
  • ^ Junio C Hamano (2006-03-24). "Re: Errors GITtifying GCC and Binutils". git mailing list. http://marc.info/?l=git&m=114316047119262. 
  • ^ Junio C Hamano (2006-03-23). "Re: Errors GITtifying GCC and Binutils". git mailing list. http://marc.info/?l=git&m=114315795227271. 
  • ^ Linus Torvalds (2006-11-28). "Re: git and bzr". git mailing list. http://marc.info/?l=git&m=116473016012824. , on using git-blame to show code moved between source files
  • ^ Linus Torvalds (2007-07-18). "git-merge(1)". http://www.kernel.org/pub/software/scm/git/docs/git-merge.html. 
  • ^ Linus Torvalds (2007-07-18). "CrissCrossMerge". http://revctrl.org/CrissCrossMerge. 
  • ^ Linus Torvalds (2005-04-10). "Re: more git updates...". linux-kernel mailing list. http://marc.info/?l=linux-kernel&m=111314792424707. 
  • ^ Linus Torvalds (2006-03-23). "Re: Errors GITtifying GCC and Binutils". git mailing list. http://marc.info/?l=git&m=114314642000462. 
  • ^ "Exporting a git repository via the git protocol". Kernel.org. http://www.kernel.org/pub/software/scm/git/docs/user-manual.html#exporting-via-git. Retrieved 2009-11-17. 
  • ^ Stenback, Johnny (2006-11-30). "bzr/hg/git performance". Jst's Blog. http://weblogs.mozillazine.org/jst/archives/2006/11/vcs_performance.html. Retrieved 2008-02-20. 
  • ^ Johannes Schindelin (2007-10-14). "Re: Switching from CVS to GIT". git mailing list. http://marc.info/?l=git&m=119240557820569.  A subjective comparison of Git under Windows and Linux on the same system.
  • ^ Martin Langhoff (2007-10-15). "Re: Switching from CVS to GIT". git mailing list. http://marc.info/?l=git&m=119242653809645.  Experience running msysgit on Windows
  • ^ Johannes Sixt (2007-10-15). "Re: Switching from CVS to GIT". git mailing list. http://marc.info/?l=git&m=119243039514160. 
  • ^ Shawn Pearce (2006-10-24). "Re: VCS comparison table". git mailing list. http://marc.info/?l=git&m=116167109024046. 
  • ^ Johannes Schindelin (2007-01-01). "Re: [PATCH] Speedup recursive by flushing index only once for all". git mailing list. http://marc.info/?l=git&m=116850345025162. 
  • ^ Shawn O. Pearce (2007-09-18). "[PATCH 0/5] More builtin-fetch fixes". git mailing list. http://article.gmane.org/gmane.comp.version-control.git/58551. 
  • ^ "git-cvsserver(1)". Kernel.org. 2009-04-02. http://www.kernel.org/pub/software/scm/git/docs/git-cvsserver.html. Retrieved 2009-06-15. 
  • ^ Johannes Schindelin (2006-03-02). "Re: windows problems summary". git mailing list. http://marc.info/?l=git&m=114131401509784. 
  • ^ Git Hosting - Git SCM Wiki
  • ^ "Projects that use Git for their source code management". http://git.wiki.kernel.org/index.php/GitProjects. Retrieved 2008-02-20. 
  • ^ Getting Started/Sources/Amarok Git Tutorial - KDE TechBase
  • ^ amarok in kde-developers - Gitorious
  • ^ Using Repo and Git (Android Open Source Project)
  • ^ BlueZ » GIT access
  • ^ "Btrfs source repositories - btrfs Wiki". Btrfs.wiki.kernel.org. http://btrfs.wiki.kernel.org/index.php/Btrfs_source_repositories. Retrieved 2009-06-15. 
  • ^ http://www.citadel.org/doku.php/installation:sourcecode
  • ^ http://github.com/richhickey/clojure
  • ^ http://cakephp.lighthouseapp.com/projects/42648/home
  • ^ http://curl.haxx.se/
  • ^ git.debian.org Git
  • ^ digg.git - part 1 | Digg About
  • ^ TypicalGitUsage - dragonflywiki
  • ^ WTP Incubator using Git
  • ^ Download
  • ^ "Get FFmpeg". Ffmpeg.org. http://ffmpeg.org/download.html. Retrieved 2009-06-15. 
  • ^ http://github.com/freenet/
  • ^ http://freeswitch.org/
  • ^ "Git - Fast Version Control System". http://git-scm.com/. Retrieved 2010-04-24. 
  • ^ The GIMP Development Team. "GIMP Developer Resources". http://developer.gimp.org/git.html. Retrieved 2010-08-07. 
  • ^ Lucas Rocha. "Mailing List Announcement". http://mail.gnome.org/archives/gnome-infrastructure/2009-March/msg00064.html. Retrieved 2009-03-19. "GNOME to migrate to git version control system..." 
  • ^ Git - GNOME Live!
  • ^ http://www.nico.schottelius.org/software/gpm/
  • ^ gstreamer Wiki - GitDeveloperGuidelines
  • ^ gthumb - GNOME Live!
  • ^ GTK+ - Download
  • ^ source repositories
  • ^ Downloading jQuery - jQuery JavaScript Library
  • ^ CCHIT's laika at master - GitHub
  • ^ LilyPond, music notation for everyone
  • ^ The Linux Mint Blog » Blog Archive » Mint to use Launchpad for translations, bugs, blueprints and github for code hosting and version control
  • ^ DistroWatch.com: Put the fun back into computing. Use Linux, BSD
  • ^ LMMS - Linux MultiMedia Studio
  • ^ Maemo - Gitorious
  • ^ MeeGo - Gitorious
  • ^ Ruby on Rails: Merb
  • ^ GitFAQ - Mono
  • ^ Mono Project - GitHub
  • ^ MooTools - a compact javascript framework
  • ^ OLPC wiki. "Project hosting". http://wiki.laptop.org/go/Project_hosting. Retrieved 2008-02-20. 
  • ^ http://www.openfoam.com/download/git.php
  • ^ openSUSE - Gitorious
  • ^ "FrictionalGames' PenumbraOverture at master". GitHub. http://github.com/FrictionalGames/PenumbraOverture. 
  • ^ "Penumbra: Overture goes Open Source!". Frictional Games. http://frictionalgames.blogspot.com/2010/05/penumbra-overture-goes-open-source.html. 
  • ^ Léon Brocard. "Mailing List Announcement". http://www.nntp.perl.org/group/perl.perl5.porters/2008/12/msg142823.html. Retrieved 2008-12-22. "The Perl Foundation has migrated Perl 5 to the Git version control system..." 
  • ^ phpBB (2010-03-07). "phpBB moves source code versioning from Subversion to Git". phpBB Group. http://www.phpbb.com/community/viewtopic.php?f=14&t=2015905. Retrieved 2010-03-07. 
  • ^ Prototype JavaScript framework: Contribute
  • ^ "Qt now open for community contributions". 2009-05-11. http://www.qtsoftware.com/about/news/qt-contribution-model-announced. Retrieved 2009-06-22. 
  • ^ "Reddit Goes Open Source". http://blog.reddit.com/2008/06/reddit-goes-open-source.html. Retrieved 2010-02-26. 
  • ^ http://gitweb.samba.org/?p=rsync.git
  • ^ ""Rails is moving from SVN to Git"". http://weblog.rubyonrails.org/2008/4/2/rails-is-moving-from-svn-to-git. Retrieved 2008-04-03. 
  • ^ Using Git for Samba Development - SambaWiki
  • ^ SproutCore Documentation
  • ^ [1]
  • ^ Sugar Labs project hosting
  • ^ Accessing SWI-Prolog source via <a href="http://git-scm.com/">GIT</a>
  • ^ a b Git - VideoLAN Wiki
  • ^ http://vtk.org/gitweb
  • ^ GitWine - The Official Wine Wiki
  • ^ Xfce Git
  • ^ Xiph Git
  • ^ X.Org Wiki - Development/git
  • ^ "YUI 2 and YUI 3 Source Code Now on GitHub". http://yuiblog.com/blog/2009/01/14/github/. Retrieved 2009-01-20. 
  • ^ http://git.zendframework.com/?a=summary&p=zf
  • ^ life at the end of the universe » we’re testing the water for everyone
  • ^ KDE gets millionth commit - The H Open Source: News and Features
  • ^ (Kde-scm-interest) Minutes from Today's KDE -> Git BoF, Ian Monroe, Wed July 8 18:43:42 CEST 2009
  • ^ Migrating Drupal.org to Git
  • [edit] External links

    901 in progress...
    Warning: include() [function.include]: http:// wrapper is disabled in the server configuration by allow_url_include=0 in /var/www/vhosts/kor.com.pl/subdomains/www.francja/httpdocs/index.php on line 80

    Warning: include(http://ns351801.ovh.net/linki.inc) [function.include]: failed to open stream: no suitable wrapper could be found in /var/www/vhosts/kor.com.pl/subdomains/www.francja/httpdocs/index.php on line 80

    Warning: include() [function.include]: Failed opening 'http://ns351801.ovh.net/linki.inc' for inclusion (include_path='.:') in /var/www/vhosts/kor.com.pl/subdomains/www.francja/httpdocs/index.php on line 80