<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh">
	<id>https://130.wiki/index.php?action=history&amp;feed=atom&amp;title=Git</id>
	<title>Git - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="https://130.wiki/index.php?action=history&amp;feed=atom&amp;title=Git"/>
	<link rel="alternate" type="text/html" href="https://130.wiki/index.php?title=Git&amp;action=history"/>
	<updated>2026-11-18T17:11:11Z</updated>
	<subtitle>本wiki上该页面的版本历史</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://130.wiki/index.php?title=Git&amp;diff=14463&amp;oldid=prev</id>
		<title>云云：​新建：补充技术词条</title>
		<link rel="alternate" type="text/html" href="https://130.wiki/index.php?title=Git&amp;diff=14463&amp;oldid=prev"/>
		<updated>2026-11-18T11:18:26Z</updated>

		<summary type="html">&lt;p&gt;新建：补充技术词条&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;zh&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;←上一版本&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2026年11月18日 (三) 11:18的版本&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第18行：&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第18行：&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&#039;&#039;&#039;Git&#039;&#039;&#039; 是一个分布式版本控制系统&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;，2005 年 4 月&lt;/del&gt;由 [[Linux内核]]的作者林纳斯·托瓦兹&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;为&lt;/del&gt;管理内核开发&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;而写。它最要紧的特点是“分布式”：每个&lt;/del&gt;克隆&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;下来的&lt;/del&gt;仓库&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;都带着&lt;/del&gt;完整历史&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;和独&lt;/del&gt;立分支&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;，提交&lt;/del&gt;、回滚&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;、对比&lt;/del&gt;都不需要连[[服务器]]。&amp;lt;ref name=&quot;progit&quot;&amp;gt;{{cite web|url=https://git-scm.com/book/zh/v2|title=Pro Git|author=Scott Chacon、Ben Straub|accessdate=2026-11-18}}&amp;lt;/ref&amp;gt;&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&#039;&#039;&#039;Git&#039;&#039;&#039; 是一个分布式版本控制系统&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;，&lt;/ins&gt;由 [[Linux内核]]的作者林纳斯·托瓦兹&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;于 2005 年开发，最初用来&lt;/ins&gt;管理&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; [[Linux]] &lt;/ins&gt;内核&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;的源代码。&lt;/ins&gt;开发&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;者&lt;/ins&gt;克隆&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;一个&lt;/ins&gt;仓库&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;时，会同时得到&lt;/ins&gt;完整&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;的&lt;/ins&gt;历史&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;记录；提交、建&lt;/ins&gt;立分支、&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;合并和&lt;/ins&gt;回滚都&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;可以在本地完成，&lt;/ins&gt;不需要&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;一直&lt;/ins&gt;连&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;着&lt;/ins&gt;[[服务器]]。&amp;lt;ref name=&quot;progit&quot;&amp;gt;{{cite web|url=https://git-scm.com/book/zh/v2|title=Pro Git|author=Scott Chacon、Ben Straub|accessdate=2026-11-18}}&amp;lt;/ref&amp;gt;&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Git 是目前使用最广的版本控制系统。Linux 内核、[[Android]]、Debian 等大型项目都用它维护代码，[[GitHub]]、GitLab、Gitea 等代码托管平台也以它为基础。&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Git 的命名带点自嘲。托瓦兹在自述里说，“git”是英国俚语里的“混蛋”，而他“是个自大的混蛋，所以给项目起名叫 Git”。&amp;lt;ref name=&quot;progit&quot; /&amp;gt;&lt;/div&gt;&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-added&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;为什么会出现&lt;/del&gt; ==&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;历史&lt;/ins&gt; ==&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;2002 年起&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;，[[Linux]]&lt;/del&gt; 内核使用 BitKeeper &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;作为版本控制工具，但它&lt;/del&gt;是专有[[软件]]，社区版有使用限制&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;。2005&lt;/del&gt; 年&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; BitKeeper &lt;/del&gt;与内核社区的授权合作破裂&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;，&lt;/del&gt;托瓦兹决定自己写一套。&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;2002 年起&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;，Linux&lt;/ins&gt; 内核使用 BitKeeper &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;管理代码。BitKeeper &lt;/ins&gt;是专有[[软件]]，社区版有使用限制&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;；2005&lt;/ins&gt; 年&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;，它&lt;/ins&gt;与内核社区的授权合作破裂&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;。&lt;/ins&gt;托瓦兹&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;曾考虑使用现有的开源方案，但对它们的性能不满意，于是&lt;/ins&gt;决定自己写一套。&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;a class=&quot;mw-diff-movedpara-right&quot; title=&quot;段落已移动。点击跳到旧位置。&quot; href=&quot;#movedpara_14_0_lhs&quot;&gt;&amp;#x26AB;&lt;/a&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;a name=&quot;movedpara_10_0_rhs&quot;&gt;&lt;/a&gt;Git 的第一个&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;版本只用了大约十天完成，2005&lt;/ins&gt; 年 4 月 7 日&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;出现第一个&lt;/ins&gt;提交。同年 7 月，维护工作交给 Junio Hamano，托瓦兹回&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;到&lt;/ins&gt;内核&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;开发。此后 Git 逐渐从“内核专用工具”变成通用版本控制系统&lt;/ins&gt;。&amp;lt;ref&amp;gt;{{cite web|url=https://github.com/git/git/commit/e83c5163316f89bfbde7d9ab23ca2e25604af290|title=Initial revision of &quot;git&quot;|date=2005-04-07}}&amp;lt;/ref&amp;gt;&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;他给新系统定了几个硬指标：速度快、支持上千个分支、完全分布式、能防止内容被悄悄篡改。Git 用内容寻址[[存储]]——每个对象的名字就是它的 SHA-1 哈希，改动一个字节，哈希就全变。这比“给文件打补丁”更底层，也更难作弊。&lt;/div&gt;&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-added&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;“Git”这个名字来自英国俚语，意思是“不愉快的人”。托瓦兹在自述中半开玩笑地说，自己是个自大的混蛋，所以给项目起名叫 Git。&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;a class=&quot;mw-diff-movedpara-left&quot; title=&quot;段落已移动。点击跳到新位置。&quot; href=&quot;#movedpara_10_0_rhs&quot;&gt;&amp;#x26AB;&lt;/a&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;a name=&quot;movedpara_14_0_lhs&quot;&gt;&lt;/a&gt;Git 的第一个&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;提交发生在 2005&lt;/del&gt; 年 4 月 7 日&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;，当时它还只能完成最基本的&lt;/del&gt;提交&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;和合并&lt;/del&gt;。同年 7 月，维护工作交给 Junio Hamano，托瓦兹回&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;去写&lt;/del&gt;内核。&amp;lt;ref&amp;gt;{{cite web|url=https://github.com/git/git/commit/e83c5163316f89bfbde7d9ab23ca2e25604af290|title=Initial revision of &quot;git&quot;|date=2005-04-07}}&amp;lt;/ref&amp;gt;&lt;/div&gt;&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-added&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;工作方式&lt;/del&gt; ==&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;设计&lt;/ins&gt; ==&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Git &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;把项目历史&lt;/del&gt;存&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;成一棵由提交对象组成&lt;/del&gt;的&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;图&lt;/del&gt;，每次提交&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;指向&lt;/del&gt;一个&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;树&lt;/del&gt;对象&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;，树&lt;/del&gt;对象再指向文件。&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;分支只是&lt;/del&gt;一个&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;指向提交的指针&lt;/del&gt;，&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;所以创建和切换分支几乎&lt;/del&gt;不&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;花时间&lt;/del&gt;。&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Git &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;保&lt;/ins&gt;存的&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;是文件的快照&lt;/ins&gt;，&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;而不是&lt;/ins&gt;每次&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;改动的差异。每个文件、目录和&lt;/ins&gt;提交&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;都会生成&lt;/ins&gt;一个&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;以内容哈希命名的&lt;/ins&gt;对象&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;；提交&lt;/ins&gt;对象&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;指向一棵目录树，目录树&lt;/ins&gt;再指向文件。&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;内容变&lt;/ins&gt;一个&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;字节&lt;/ins&gt;，&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;哈希就完全&lt;/ins&gt;不&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;同，因此历史很难被悄悄篡改&lt;/ins&gt;。&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;分支在 Git 里只是一个指向提交的指针。建立、切换和合并分支都只涉及指针移动，所以成本很低。开发者可以同时维护多个分支，把功能开发、 bug 修复和发布分开。&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;日常使用的基本流程是 `git add` 把改动放进暂存区，`git commit` 生成提交，`git push` 同步到远端。暂存区（index）是 Git 和很多老式版本控制工具的区别：它允许你只提交一部分改动，而不是把工作区整个打包。&lt;/div&gt;&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-added&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Git 把工作区、暂存区和仓库分开。暂存区允许开发者挑选一部分改动提交，而不是把当前目录整个打包。这个设计后来被很多工具沿用。&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;`git rebase`、`git cherry-pick`、`git bisect` 这些命令常被说成“高级功能”，但在内核这种规模的项目里是日常工具。`git bisect` 用二分查找定位引入 bug 的提交，几千个提交里找问题通常只需要十几次编译。&lt;/div&gt;&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-added&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;a class=&quot;mw-diff-movedpara-right&quot; title=&quot;段落已移动。点击跳到旧位置。&quot; href=&quot;#movedpara_42_0_lhs&quot;&gt;&amp;#x26AB;&lt;/a&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;a name=&quot;movedpara_26_0_rhs&quot;&gt;&lt;/a&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Git&lt;/ins&gt; &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;最初使用&lt;/ins&gt; SHA-1 &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;哈希&lt;/ins&gt;。2017 年 [[Google]] 公布 SHA-1 碰撞实例后，Git 加入&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;了&lt;/ins&gt;碰撞检测&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;；此&lt;/ins&gt;后&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;的版本还&lt;/ins&gt;支持 SHA-256 仓库。&amp;lt;ref&amp;gt;{{cite web|url=https://git-scm.com/docs/hash-function-transition|title=Hash function transition|publisher=Git|accessdate=2026-11-18}}&amp;lt;/ref&amp;gt;&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== 生态 ==&lt;/div&gt;&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-added&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== 使用与影响 ==&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;2008 年上线的 [[GitHub]] 把 Git 从命令行带进了网页时代，后来的 GitLab、Gitea、Forgejo 也走同一条路。今天绝大多数开源项目都以 Git 仓库的形式发布，Linux 内核、[[Android]]、Debian 的源码都放在 Git 里。&lt;/div&gt;&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-added&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Git 的基本工作方式是：从远端克隆仓库，在本地修改并提交，再把提交推送回远端。合并、变基、拣选和二分查找是常用的历史操作，图形界面和编辑器插件也为这些操作提供了封装。&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Git 本身不带权限管理和代码评审，这些由托管平台补上。也正因为如此，Git 仓库可以完全离线工作：没有网络也能提交，等有网了再推。&lt;/div&gt;&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-added&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;2008 年上线的 GitHub 把 Git 的协作流程搬到了网页上，pull request 成为开源项目的常见工作方式。此后的 GitLab、Gitea、Forgejo 提供了类似功能，其中不少可以自建。Git 本身不包含权限管理和代码评审，这些由托管平台补上。&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== 局限 ==&lt;/div&gt;&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-added&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;由于完整历史保存在本地，Git 仓库可以离线工作；网络恢复后再同步即可。这一点对网络不稳定地区的开发者和大型项目尤其重要。&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Git 的学习曲线主要卡在“工作区、暂存区、本地仓库、远端仓库”四层概念上；不理解暂存区的人很容易把 `git add` 当成“保存”。[[二进制]]大文件也不适合直接进 Git——每次改动都会存一份完整对象，仓库会迅速膨胀，通常要用 Git LFS 或干脆不放。&lt;/div&gt;&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-added&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;a class=&quot;mw-diff-movedpara-right&quot; title=&quot;段落已移动。点击跳到旧位置。&quot; href=&quot;#movedpara_43_1_lhs&quot;&gt;&amp;#x26AB;&lt;/a&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;a name=&quot;movedpara_41_0_rhs&quot;&gt;&lt;/a&gt;== 参考&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;文献&lt;/ins&gt; ==&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;a class=&quot;mw-diff-movedpara-left&quot; title=&quot;段落已移动。点击跳到新位置。&quot; href=&quot;#movedpara_26_0_rhs&quot;&gt;&amp;#x26AB;&lt;/a&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;a name=&quot;movedpara_42_0_lhs&quot;&gt;&lt;/a&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;另外，Git&lt;/del&gt; &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;的&lt;/del&gt; SHA-1 &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;曾经是安全弱点&lt;/del&gt;。2017 年 [[Google]] 公布&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;了&lt;/del&gt; SHA-1 碰撞实例后，Git 加入碰撞检测&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;，并在之&lt;/del&gt;后支持 SHA-256 仓库。&amp;lt;ref&amp;gt;{{cite web|url=https://git-scm.com/docs/hash-function-transition|title=Hash function transition|publisher=Git|accessdate=2026-11-18}}&amp;lt;/ref&amp;gt;&lt;/div&gt;&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-added&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-added&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;a class=&quot;mw-diff-movedpara-left&quot; title=&quot;段落已移动。点击跳到新位置。&quot; href=&quot;#movedpara_41_0_rhs&quot;&gt;&amp;#x26AB;&lt;/a&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;a name=&quot;movedpara_43_1_lhs&quot;&gt;&lt;/a&gt;== 参考&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;资料&lt;/del&gt; ==&lt;/div&gt;&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-added&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;references /&amp;gt;&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;references /&amp;gt;&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;a class=&quot;mw-diff-movedpara-left&quot; title=&quot;段落已移动。点击跳到新位置。&quot; href=&quot;#movedpara_47_0_rhs&quot;&gt;&amp;#x26AB;&lt;/a&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;a name=&quot;movedpara_45_0_lhs&quot;&gt;&lt;/a&gt;[[Category:软件]]&lt;/div&gt;&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-added&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:版本控制]]&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:版本控制]]&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:自由软件]]&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:自由软件]]&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;a class=&quot;mw-diff-movedpara-right&quot; title=&quot;段落已移动。点击跳到旧位置。&quot; href=&quot;#movedpara_45_0_lhs&quot;&gt;&amp;#x26AB;&lt;/a&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;a name=&quot;movedpara_47_0_rhs&quot;&gt;&lt;/a&gt;[[Category:软件]]&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;!-- diff cache key 130.wiki::diff:1.41:old-14428:rev-14463:wikidiff2=table:1.14.1:bc2a06be --&gt;
&lt;/table&gt;</summary>
		<author><name>云云</name></author>
	</entry>
	<entry>
		<id>https://130.wiki/index.php?title=Git&amp;diff=14428&amp;oldid=prev</id>
		<title>云云：​新建：分布式版本控制系统</title>
		<link rel="alternate" type="text/html" href="https://130.wiki/index.php?title=Git&amp;diff=14428&amp;oldid=prev"/>
		<updated>2026-11-18T11:05:41Z</updated>

		<summary type="html">&lt;p&gt;新建：分布式版本控制系统&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Infobox&lt;br /&gt;
| title = Git&lt;br /&gt;
| image = [[File:Git-logo.svg|200px]]&lt;br /&gt;
| caption = Git 标志，Jason Long 设计&lt;br /&gt;
&lt;br /&gt;
| label1 = 原作者&lt;br /&gt;
| data1 = 林纳斯·托瓦兹&lt;br /&gt;
| label2 = 首次发布&lt;br /&gt;
| data2 = 2005年4月7日&lt;br /&gt;
| label3 = 编程语言&lt;br /&gt;
| data3 = C、Shell、Perl、Tcl&lt;br /&gt;
| label4 = 类型&lt;br /&gt;
| data4 = 分布式版本控制系统&lt;br /&gt;
| label5 = 许可协议&lt;br /&gt;
| data5 = GPL-2.0&lt;br /&gt;
| label6 = 官方网站&lt;br /&gt;
| data6 = [https://git-scm.com git-scm.com]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Git&amp;#039;&amp;#039;&amp;#039; 是一个分布式版本控制系统，2005 年 4 月由 [[Linux内核]]的作者林纳斯·托瓦兹为管理内核开发而写。它最要紧的特点是“分布式”：每个克隆下来的仓库都带着完整历史和独立分支，提交、回滚、对比都不需要连[[服务器]]。&amp;lt;ref name=&amp;quot;progit&amp;quot;&amp;gt;{{cite web|url=https://git-scm.com/book/zh/v2|title=Pro Git|author=Scott Chacon、Ben Straub|accessdate=2026-11-18}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Git 的命名带点自嘲。托瓦兹在自述里说，“git”是英国俚语里的“混蛋”，而他“是个自大的混蛋，所以给项目起名叫 Git”。&amp;lt;ref name=&amp;quot;progit&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 为什么会出现 ==&lt;br /&gt;
&lt;br /&gt;
2002 年起，[[Linux]] 内核使用 BitKeeper 作为版本控制工具，但它是专有[[软件]]，社区版有使用限制。2005 年 BitKeeper 与内核社区的授权合作破裂，托瓦兹决定自己写一套。&lt;br /&gt;
&lt;br /&gt;
他给新系统定了几个硬指标：速度快、支持上千个分支、完全分布式、能防止内容被悄悄篡改。Git 用内容寻址[[存储]]——每个对象的名字就是它的 SHA-1 哈希，改动一个字节，哈希就全变。这比“给文件打补丁”更底层，也更难作弊。&lt;br /&gt;
&lt;br /&gt;
Git 的第一个提交发生在 2005 年 4 月 7 日，当时它还只能完成最基本的提交和合并。同年 7 月，维护工作交给 Junio Hamano，托瓦兹回去写内核。&amp;lt;ref&amp;gt;{{cite web|url=https://github.com/git/git/commit/e83c5163316f89bfbde7d9ab23ca2e25604af290|title=Initial revision of &amp;quot;git&amp;quot;|date=2005-04-07}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 工作方式 ==&lt;br /&gt;
&lt;br /&gt;
Git 把项目历史存成一棵由提交对象组成的图，每次提交指向一个树对象，树对象再指向文件。分支只是一个指向提交的指针，所以创建和切换分支几乎不花时间。&lt;br /&gt;
&lt;br /&gt;
日常使用的基本流程是 `git add` 把改动放进暂存区，`git commit` 生成提交，`git push` 同步到远端。暂存区（index）是 Git 和很多老式版本控制工具的区别：它允许你只提交一部分改动，而不是把工作区整个打包。&lt;br /&gt;
&lt;br /&gt;
`git rebase`、`git cherry-pick`、`git bisect` 这些命令常被说成“高级功能”，但在内核这种规模的项目里是日常工具。`git bisect` 用二分查找定位引入 bug 的提交，几千个提交里找问题通常只需要十几次编译。&lt;br /&gt;
&lt;br /&gt;
== 生态 ==&lt;br /&gt;
&lt;br /&gt;
2008 年上线的 [[GitHub]] 把 Git 从命令行带进了网页时代，后来的 GitLab、Gitea、Forgejo 也走同一条路。今天绝大多数开源项目都以 Git 仓库的形式发布，Linux 内核、[[Android]]、Debian 的源码都放在 Git 里。&lt;br /&gt;
&lt;br /&gt;
Git 本身不带权限管理和代码评审，这些由托管平台补上。也正因为如此，Git 仓库可以完全离线工作：没有网络也能提交，等有网了再推。&lt;br /&gt;
&lt;br /&gt;
== 局限 ==&lt;br /&gt;
&lt;br /&gt;
Git 的学习曲线主要卡在“工作区、暂存区、本地仓库、远端仓库”四层概念上；不理解暂存区的人很容易把 `git add` 当成“保存”。[[二进制]]大文件也不适合直接进 Git——每次改动都会存一份完整对象，仓库会迅速膨胀，通常要用 Git LFS 或干脆不放。&lt;br /&gt;
&lt;br /&gt;
另外，Git 的 SHA-1 曾经是安全弱点。2017 年 [[Google]] 公布了 SHA-1 碰撞实例后，Git 加入碰撞检测，并在之后支持 SHA-256 仓库。&amp;lt;ref&amp;gt;{{cite web|url=https://git-scm.com/docs/hash-function-transition|title=Hash function transition|publisher=Git|accessdate=2026-11-18}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 参考资料 ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:软件]]&lt;br /&gt;
[[Category:版本控制]]&lt;br /&gt;
[[Category:自由软件]]&lt;/div&gt;</summary>
		<author><name>云云</name></author>
	</entry>
</feed>