我需要阅读什么才能理解 git 的工作原理?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/261557/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 05:55:26  来源:igfitidea点击:

What do I need to read to understand how git works?

git

提问by MrFox

I would like to understand the way git works from a architects point of view. How are files stored, how are versions kept and how do changes happen (branches, merges, etc.)?

我想从架构师的角度了解 git 的工作方式。文件如何存储、版本如何保存以及更改如何发生(分支、合并等)?

I am not searching for information how to use it. (I already found a lot of pages with tutorials.) But I did not find any "behind the scenes" details, that would make me understand.

我不是在寻找如何使用它的信息。(我已经找到了很多带有教程的页面。)但我没有找到任何“幕后”细节,这会让我理解。

回答by Gene T

For me, the following three resources were very, very helpful, in this order:

对我来说,以下三个资源非常非常有帮助,按顺序排列:

  1. The Thing About Gitexplained why I should even care

  2. Git Magicexplained how to get started

  3. Git The Basics[pdf] explained - graphically, and in detail - what happens when I add, remove, merge, etc.

  1. 关于 Git 的事情解释了为什么我应该关心

  2. Git Magic解释了如何开始

  3. Git The Basics[pdf] 以图形方式详细解释了当我添加、删除、合并等时会发生什么。

回答by Aristotle Pagaltzis

The Git Internalsebook has already been mentioned. I will point out that its author, Scott Chacon, gave a fantastic presentation about git at RailsConf 2008that covers much the same ground as the book.

Git的内幕电子书已经提到。我要指出的是,它的作者 Scott Chacon在 RailsConf 2008上做了一个关于 git 的精彩演讲,涵盖了与本书大致相同的内容。

Said Scott now maintains http://git-scm.com/, which includes the Git community book, which is more of a usage tutorial than a technical description, but does include both a nice conceptual overview of the git data model in the introductory chapter and a detailed one in its closing chapter.

说 Scott 现在维护http://git-scm.com/,其中包括Git 社区书,这更像是一个使用教程而不是技术描述,但在介绍中确实包含了 git 数据模型的一个很好的概念概述一章,并在其最后一章中详细介绍。

回答by J. Bruni

To understand how git works you need to read Pro Gitbook, fully available online for free.

要了解 git 的工作原理,您需要阅读Pro Git书籍,完全免费在线提供

Written by Scott Chacon, one of the guys behind GitHub.

GitHub背后的人之一 Scott Chacon 撰写。

I wrote my opinion about the book in a review at Amazon.

在亚马逊的评论中写下了我对这本书的看法

回答by Talespin_Kit

Assume we are living in a pre git era. And you want to write a version control system which is fast and better than the existing vcs. All you need is a great idea. At that moment of time the below article would be of much help.

假设我们生活在一个前 git 时代。并且您想编写一个比现有 vcs 更快更好的版本控制系统。你所需要的只是一个好主意。在那个时候,下面的文章会很有帮助。

http://tom.preston-werner.com/2009/05/19/the-git-parable.html

http://tom.preston-werner.com/2009/05/19/the-git-parable.html

回答by Pat Notz

The US$9 100+ page PDF book from PeepCode called Git Internalsis fantastic. It's well written, uses great, clear visuals and is also a quick read. I absorbed as much free online material as I could but this book put me over the top.

来自 PeepCode 的名为Git Internals 的价值 9 美元的 100 多页 PDF 书非常棒。它写得很好,使用了很棒的清晰的视觉效果,而且阅读速度也很快。我尽可能多地吸收了免费的在线材料,但这本书让我处于领先地位。

回答by Colonel Sponsz

There's a good Google tech talk: Linus Torvalds on git

有一个很好的 Google 技术演讲: Linus Torvalds on git

OK, it's not something to read but it does cover some of the Git internals and design philosophy.

好的,这不是什么读物,但它确实涵盖了一些 Git 内部结构和设计理念。

回答by warren

I found this site when I googled "git architecture": http://speirs.org/2007/07/19/a-subversion-user-looks-at-git

我在谷歌搜索“git架构”时发现了这个网站:http: //speirs.org/2007/07/19/a-subversion-user-looks-at-git

Git has a mailing list: "[email protected]&body=subscribe%20git" (http://git.or.cz/#community)

Git 有一个邮件列表:“[email protected]&body=subscribe%20git”(http://git.or.cz/#community

And this wikipedia article may be helpful: http://en.wikipedia.org/wiki/Git_(software)

这篇维基百科文章可能会有所帮助:http: //en.wikipedia.org/wiki/Git_(software)

回答by Chris Young

The git source code. :-)

git 源代码。:-)