250新风系统管道尺寸:Git

来源:百度文库 编辑:偶看新闻 时间:2024/05/06 17:18:49

Git 是一个由林纳斯·托瓦兹为了更好地管理linux内核开发而创立的分布式版本控制/软件配置管理软件。需要注意的是和GNU Interactive Tools,一个类似Norton Commander界面的文件管理器相区分。

Git最初的开发动力来自于BitKeeper和Monotone[2][3]。 Git最初只是作为一个可以被其他前端比如Cogito 或 StGIT[4]包装的后端而开发的。不过,后来Git内核已经成熟到可以独立地用作版本控制[5]。很多有名的软件都使用Git来进行版本控制[6],其中有Linux内核、X.Org服务器和OLPC内核开发。[7]

目录

 [隐藏] 
  • 1 命名来源
  • 2 主要功能
  • 3 早期历史
  • 4 实现原理
  • 5 库结构
  • 6 移植性
  • 7 使用
    • 7.1 使用Git的专案
  • 8 相关条目
  • 9 参考文献
  • 10 外部链接

[编辑] 命名来源

林纳斯·托瓦兹自嘲地取了这个名字"git"。在英式英语中指一个愚笨或者不开心的人。[8]

“I'm an egotistical bastard, and I name all my projects after myself. First Linux, now git.”

Git的官方维基也给出了多种其他的关于名字的解释。[9]

[编辑] 主要功能

Git --- The stupid content tracker, 傻瓜内容跟踪器。Linux是这样给我们介绍 Git 的。

Git 是用于 Linux 内核开发的版本控制工具。与常用的版本控制工具 CVS, Subversion 等不同,它采用了分布式版本库的方式,不必服务器端软件支持,使源代码的发布和交流极其方便。 Git 的速度很快,这对于诸如 Linux kernel 这样的大项目来说自然很重要。 Git 最为出色的是它的合并跟踪(merge tracing)能力。

实际上内核开发团队决定开始开发和使用 Git 来作为内核开发的版本控制系统的时候,世界开源社群的反对声音不少,最大的理由是 Git 太艰涩难懂,从 Git 的内部工作机制来说,的确是这样。但是随着开发的深入,Git 的正常使用都由一些友好的脚本命令来执行,使 Git 变得非常好用,即使是用来管理我们自己的开发项目,Git 都是一个友好,有力的工具。现在,越来越多的著名项目采用 Git 来管理项目开发,例如:wine, U-boot 等[2]。

作为开源自由原教旨主义项目,Git 没有对版本库的浏览和修改做任何的权限限制,通过其他工具也可以达到有限的权限控制,比如:gitosis, CodeBeamer MR。原本 Git的使用范围只适用于 Linux / Unix 平台,但逐步并成熟了在 Windows 平台下的使用,主要归功于Cygwin与msysgit环境与TortoiseGit这样易用的 GUI 工具。其实 Git 的源代码中已经加入了对 Cygwin 与 MinGW 编译环境的支持并被逐步完善,对于 Windows 使用者是个福音。

[编辑] 早期历史

早期Linux的开发人员是使用 BitKeeper 来管理版本控制和维护程式码。2005年的时候,开发 BitKeeper 的公司同 Linux 内核开源社区结束合作关系,并收回使用BitKeeper的权利。Torvalds 开始着手开发Git 来替代BitKeeper。

[编辑] 实现原理

Git 和其他版本控制系统(如CVS)有不少的差别,Git 本身关心档案的整体性是否有改变,但多数的CVS,或Subversion 系统则在乎档案内容的差异。因此Git 更像一个档案系统,直接在本机上取得资料,不必连线到host端取资料回来。

[编辑] 库结构

hooks 存储钩子的文件夹

logs 存储日志的文件夹

refs 存储指向各个分支的指针(SHA-1标识)文件

objects 存放git对象

config 存放各种设置文档

HEAD 指向当前所在分支的指针文件路径,一般指向refs下的某文件

[编辑] 移植性

在 Windows 平台上有msysgit与TortoiseGit可资利用。TortoiseGit 还提供有GUI。

现在 git也提供windows版本下载。http://git-scm.com/download

[编辑] 使用

[编辑] 使用Git的专案

有不少的专案目前都使用Git:[10]

  • Amarok[11][12]
  • Android[13]
  • Arch Linux
  • Aquamacs Emacs
  • BlueZ[14]
  • Btrfs[15]
  • Clojure
  • CakePHP
  • Debian[16]
  • Digg[17]
  • DragonFly BSD[18]
  • Drupal[19]
  • Elinks[20]
  • Fedora
  • FFmpeg [21]
  • Freenet
  • git[22]
  • GIMP
  • GNOME[23][24]
  • GPM
  • GStreamer[25]
  • gThumb[26]
  • GTK+[27]
  • Hurd[28]
  • jQuery[29]
  • Laika (EHR testing framework)[30]
  • LilyPond (music typesetting)[31]
  • Linux kernel
  • Linux Mint[32][33]
  • LMMS Music Production Software [34]
  • Maemo[35]
  • MeeGo[36]
  • Merb[37]
  • MooTools[38]
  • One Laptop Per Child (OLPC)[39]
  • OpenFOAM
  • openSUSE[40]
  • Perl[41]
  • phpBB[42]
  • Prototype.js[43]
  • Qt[44]
  • Reddit[45]
  • rsync
  • Ruby on Rails[46]
  • Samba[47]
  • SproutCore[48]
  • Sugar[49]
  • SWI-Prolog[50]
  • VLC[51]
  • Wine[52]
  • Xiph[53]
  • X.org Server[54]
  • x264[51]
  • YUI[55]

[编辑] 相关条目

一些著名的采用Git的开源项目:

  • Git itself
  • Linux Kernel
  • PostgreSQL
  • Debian
  • Perl
  • Gnome
  • Android
  • X.org
  • Amarok [56]
  • Qt[57]

[编辑] 参考文献

  1. ^ http://git.kernel.org/?p=git/git.git;a=tree
  2. ^ Linus Torvalds. Re: [ANNOUNCE] Git wiki. linux-kernel mailing list. 2006-05-05. "Some historical background" on git's predecessors
  3. ^ Linus Torvalds. Re: Kernel SCM saga. linux-kernel mailing list. 2005-04-07.
  4. ^ Linus Torvalds. Re: Kernel SCM saga. linux-kernel mailing list. 2005-04-08 [2008-02-20].
  5. ^ Linus Torvalds. Re: Errors GITtifying GCC and Binutils. git mailing list. 2006-03-23.
  6. ^ Projects that use Git for their source code management [2008-02-20].
  7. ^ OLPC wiki. Project hosting [2008-02-20].
  8. ^ After controversy, Torvalds begins work on git. InfoWorld. 2005-04-19 [2008-02-20]. ISSN 0199-6649.
  9. ^ GitFaq: Why the 'git' name?
  10. ^ Projects that use Git for their source code management [2008-02-20].
  11. ^ Getting Started/Sources/Amarok Git Tutorial - KDE TechBase
  12. ^ amarok in kde-developers - Gitorious
  13. ^ Using Repo and Git (Android Open Source Project)
  14. ^ BlueZ ? GIT access
  15. ^ Btrfs source repositories - btrfs Wiki. Btrfs.wiki.kernel.org [2009-06-15].
  16. ^ git.debian.org Git
  17. ^ digg.git - part 1 | Digg About
  18. ^ TypicalGitUsage - dragonflywiki
  19. ^ [1]
  20. ^ Download
  21. ^ Get FFmpeg. Ffmpeg.org [2009-06-15].
  22. ^ Git - Fast Version Control System [2010-04-24].
  23. ^ Lucas Rocha. Mailing List Announcement [2009-03-19]. "GNOME to migrate to git version control system..."
  24. ^ Git - GNOME Live!
  25. ^ gstreamer Wiki - GitDeveloperGuidelines
  26. ^ gthumb - GNOME Live!
  27. ^ GTK+ - Download
  28. ^ source repositories
  29. ^ Downloading jQuery - jQuery JavaScript Library
  30. ^ CCHIT's laika at master - GitHub
  31. ^ LilyPond, music notation for everyone
  32. ^ The Linux Mint Blog ? Blog Archive ? Mint to use Launchpad for translations, bugs, blueprints and github for code hosting and version control
  33. ^ DistroWatch.com: Put the fun back into computing. Use Linux, BSD
  34. ^ LMMS - Linux MultiMedia Studio
  35. ^ Maemo - Gitorious
  36. ^ MeeGo - Gitorious
  37. ^ Ruby on Rails: Merb
  38. ^ MooTools - a compact javascript framework
  39. ^ OLPC wiki. Project hosting [2008-02-20].
  40. ^ openSUSE - Gitorious
  41. ^ Léon Brocard. Mailing List Announcement [2008-12-22]. "The Perl Foundation has migrated Perl 5 to the Git version control system..."
  42. ^ phpBB. phpBB moves source code versioning from Subversion to Git. phpBB Group. 2010-03-07 [2010-03-07].
  43. ^ Prototype JavaScript framework: Contribute
  44. ^ Qt now open for community contributions. 2009-05-11 [2009-06-22].
  45. ^ Reddit Goes Open Source [2010-02-26].
  46. ^ "Rails is moving from SVN to Git" [2008-04-03].
  47. ^ Using Git for Samba Development - SambaWiki
  48. ^ SproutCore Documentation
  49. ^ Sugar Labs project hosting
  50. ^ Accessing SWI-Prolog source via GIT
  51. ^ 51.0 51.1 Git - VideoLAN Wiki
  52. ^ GitWine - The Official Wine Wiki
  53. ^ Xiph Git
  54. ^ X.Org Wiki - Development/git
  55. ^ YUI 2 and YUI 3 Source Code Now on GitHub [2009-01-20].
  56. ^ http://dot.kde.org/2009/07/20/kde-reaches-1000000-commits-its-subversion-repository
  57. ^ Press Release (2009-05-11). Qt now open for community contributions [2009-06-22].

[编辑] 外部链接

自由软件主题首页
  • Git 主页(英语)
  • Git快速入门(英语)
  • Git Man Page(英语)
  • Git用户手册(英语)
  • Git Community Book(英语)
  • 使用Git管理源代码
  • Git# (GitSharp) (英语)
  • ProGit英文版
  • ProGit中文版