3
3
< head >
4
4
< meta charset ="utf-8 " />
5
5
< meta name ="viewport " content ="width=device-width, initial-scale=1.0 " />
6
- < title > 对 Linux 内核实验室项目做贡献 — Linux 系统内核 文档 </ title > < link rel ="stylesheet " href ="../_static/css/theme.css " type ="text/css " />
6
+ < title > 对 Linux 内核实验室项目做贡献 — Linux 系统内核 documentation </ title > < link rel ="stylesheet " href ="../_static/css/theme.css " type ="text/css " />
7
7
< link rel ="stylesheet " href ="../_static/pygments.css " type ="text/css " />
8
8
< link rel ="stylesheet " href ="../_static/asciinema-player.css " type ="text/css " />
9
9
< link rel ="stylesheet " href ="../_static/theme_overrides.css " type ="text/css " />
15
15
var DOCUMENTATION_OPTIONS = {
16
16
URL_ROOT :'../' ,
17
17
VERSION :'' ,
18
- LANGUAGE :'zh_CN ' ,
18
+ LANGUAGE :'zh-CN ' ,
19
19
COLLAPSE_INDEX :false ,
20
20
FILE_SUFFIX :'.html' ,
21
21
HAS_SOURCE : true ,
26
26
< script src ="../_static/underscore.js "> </ script >
27
27
< script src ="../_static/doctools.js "> </ script >
28
28
< script src ="../_static/asciinema-player.js "> </ script >
29
- < script src ="../_static/translations.js "> </ script >
30
29
< script src ="../_static/js/theme.js "> </ script >
31
- < link rel ="index " title ="索引 " href ="../genindex.html " />
32
- < link rel ="search " title ="搜索 " href ="../search.html " />
30
+ < link rel ="index " title ="Index " href ="../genindex.html " />
31
+ < link rel ="search " title ="Search " href ="../search.html " />
33
32
< link rel ="next " title ="中文翻译介绍 " href ="chinese-localization-info.html " />
34
33
< link rel ="prev " title ="自定义虚拟机配置 " href ="extra-vm.html " />
35
34
</ head >
135
134
< div itemprop ="articleBody ">
136
135
137
136
< div class ="section " id ="linux ">
138
- < h1 > 对 Linux 内核实验室项目做贡献< a class ="headerlink " href ="#linux " title ="永久链接至标题 "> ¶</ a > </ h1 >
137
+ < h1 > 对 Linux 内核实验室项目做贡献< a class ="headerlink " href ="#linux " title ="Permalink to this headline "> ¶</ a > </ h1 >
139
138
< p > < code class ="docutils literal "> < span class ="pre "> Linux</ span > < span class ="pre "> 内核实验室</ span > </ code > 是一个开放的平台。你可以通过对文档、练习或基础设施的贡献来帮助它变得更好。无论是对错别字的修正还是在文档中添加新的部分,所有的贡献我们都欢迎。</ p >
140
139
< p > 所有需要进行贡献的信息都可以在 < a class ="reference external " href ="https://github.com/linux-kernel-labs/linux "> linux 内核实验室 Linux 仓库</ a > 中找到。如果要改变任何东西,你需要从你自己的 fork 创建一个拉取请求(< code class ="docutils literal "> < span class ="pre "> Pull</ span > < span class ="pre "> Request</ span > </ code > ,< code class ="docutils literal "> < span class ="pre "> PR</ span > </ code > )到这个仓库。PR 将由团队成员进行审核,并在解决任何可能的问题后合并。</ p >
141
140
< div class ="section " id ="section-1 ">
142
- < h2 > 仓库结构< a class ="headerlink " href ="#section-1 " title ="永久链接至标题 "> ¶</ a > </ h2 >
141
+ < h2 > 仓库结构< a class ="headerlink " href ="#section-1 " title ="Permalink to this headline "> ¶</ a > </ h2 >
143
142
< p > < a class ="reference external " href ="https://github.com/linux-kernel-labs/linux "> Linux 内核实验室仓库</ a > 是 Linux 内核仓库的一个 fork,增加了以下内容:</ p >
144
143
< blockquote >
145
144
< div > < ul class ="simple ">
@@ -153,13 +152,13 @@ <h2>仓库结构<a class="headerlink" href="#section-1" title="永久链接至
153
152
</ div > </ blockquote >
154
153
</ div >
155
154
< div class ="section " id ="section-2 ">
156
- < h2 > 构建文档< a class ="headerlink " href ="#section-2 " title ="永久链接至标题 "> ¶</ a > </ h2 >
155
+ < h2 > 构建文档< a class ="headerlink " href ="#section-2 " title ="Permalink to this headline "> ¶</ a > </ h2 >
157
156
< p > 要构建文档,请导航到 < code class ="docutils literal "> < span class ="pre "> tools/labs</ span > </ code > 并运行以下命令:</ p >
158
157
< div class ="highlight-bash "> < div class ="highlight "> < pre > < span > </ span > make docs
159
158
</ pre > </ div >
160
159
</ div >
161
160
< div class ="admonition note ">
162
- < p class ="first admonition-title "> 注解 </ p >
161
+ < p class ="first admonition-title "> Note </ p >
163
162
< p > 该命令会安装所有需要的包。在某些情况下,包的安装或文档的构建可能会因为依赖版本不兼容而失败。</ p >
164
163
< p > 与其费力去修复依赖,构建文档最简单的方法是使用 < a class ="reference external " href ="https://www.docker.com/ "> Docker</ a > 。 首先,在你的主机上安装 < code class ="docutils literal "> < span class ="pre "> docker</ span > </ code > 和 < code class ="docutils literal "> < span class ="pre "> docker-compose</ span > </ code > ,然后运行:</ p >
165
164
< div class ="highlight-bash "> < div class ="highlight "> < pre > < span > </ span > make docker-docs
@@ -169,9 +168,9 @@ <h2>构建文档<a class="headerlink" href="#section-2" title="永久链接至
169
168
</ div >
170
169
</ div >
171
170
< div class ="section " id ="section-3 ">
172
- < h2 > 做出贡献< a class ="headerlink " href ="#section-3 " title ="永久链接至标题 "> ¶</ a > </ h2 >
171
+ < h2 > 做出贡献< a class ="headerlink " href ="#section-3 " title ="Permalink to this headline "> ¶</ a > </ h2 >
173
172
< div class ="section " id ="fork ">
174
- < h3 > Fork 仓库< a class ="headerlink " href ="#fork " title ="永久链接至标题 "> ¶</ a > </ h3 >
173
+ < h3 > Fork 仓库< a class ="headerlink " href ="#fork " title ="Permalink to this headline "> ¶</ a > </ h3 >
175
174
< ol class ="arabic ">
176
175
< li > < p class ="first "> 如果你还没有做过,请把 < a class ="reference external " href ="https://github.com/linux-kernel-labs/linux "> linux-kernel-labs repo</ a > 仓库克隆到本地:</ p >
177
176
< div class ="highlight-bash "> < div class ="highlight "> < pre > < span > </ span > $ mkdir -p ~/src
@@ -190,9 +189,9 @@ <h3>Fork 仓库<a class="headerlink" href="#fork" title="永久链接至标题">
190
189
< p > 现在,你可以用 < code class ="docutils literal "> < span class ="pre "> my_fork</ span > </ code > 来代替 < code class ="docutils literal "> < span class ="pre "> origin</ span > </ code > 推送到你的分叉(例如 < code class ="docutils literal "> < span class ="pre "> git</ span > < span class ="pre "> push</ span > < span class ="pre "> my_fork</ span > < span class ="pre "> master</ span > </ code > )。</ p >
191
190
</ div >
192
191
< div class ="section " id ="section-4 ">
193
- < h3 > 创建拉取请求< a class ="headerlink " href ="#section-4 " title ="永久链接至标题 "> ¶</ a > </ h3 >
192
+ < h3 > 创建拉取请求< a class ="headerlink " href ="#section-4 " title ="Permalink to this headline "> ¶</ a > </ h3 >
194
193
< div class ="admonition warning ">
195
- < p class ="first admonition-title "> 警告 </ p >
194
+ < p class ="first admonition-title "> Warning </ p >
196
195
< p class ="last "> 拉取请求必须从它们自己的分支创建,这些分支是从``master``开始的。</ p >
197
196
</ div >
198
197
< ol class ="arabic simple ">
@@ -215,7 +214,7 @@ <h3>创建拉取请求<a class="headerlink" href="#section-4" title="永久链
215
214
</ pre > </ div >
216
215
</ div >
217
216
< div class ="admonition note ">
218
- < p class ="first admonition-title "> 注解 </ p >
217
+ < p class ="first admonition-title "> Note </ p >
219
218
< p > 你也可以将最新的 master 推送到你 fork 的仓库:</ p >
220
219
< div class ="last highlight-bash "> < div class ="highlight "> < pre > < span > </ span > student@eg106:~/src/linux$ git push my_fork master
221
220
</ pre > </ div >
@@ -240,7 +239,7 @@ <h3>创建拉取请求<a class="headerlink" href="#section-4" title="永久链
240
239
</ pre > </ div >
241
240
</ div >
242
241
< div class ="admonition warning ">
243
- < p class ="first admonition-title "> 警告 </ p >
242
+ < p class ="first admonition-title "> Warning </ p >
244
243
< p > 提交信息必须包含对更改的相关描述以及已更改组件的位置。</ p >
245
244
< p > 示例:</ p >
246
245
< blockquote class ="last ">
@@ -273,7 +272,7 @@ <h3>创建拉取请求<a class="headerlink" href="#section-4" title="永久链
273
272
</ div > </ blockquote >
274
273
</ div >
275
274
< div class ="section " id ="section-5 ">
276
- < h3 > 修改拉取请求< a class ="headerlink " href ="#section-5 " title ="永久链接至标题 "> ¶</ a > </ h3 >
275
+ < h3 > 修改拉取请求< a class ="headerlink " href ="#section-5 " title ="Permalink to this headline "> ¶</ a > </ h3 >
277
276
< p > 在收到对你的更改的反馈后,你可能需要更新拉取请求。你应该对同一分支进行新的推送。为此,请按照以下步骤操作:</ p >
278
277
< ol class ="arabic simple ">
279
278
< li > 确保你的分支仍然与 < code class ="docutils literal "> < span class ="pre "> linux-kernel-labs</ span > </ code > 仓库的 < code class ="docutils literal "> < span class ="pre "> master</ span > </ code > 分支同步。</ li >
@@ -284,7 +283,7 @@ <h3>修改拉取请求<a class="headerlink" href="#section-5" title="永久链
284
283
</ pre > </ div >
285
284
</ div >
286
285
< div class ="admonition note ">
287
- < p class ="first admonition-title "> 注解 </ p >
286
+ < p class ="first admonition-title "> Note </ p >
288
287
< p > 如果你遇到冲突,这意味着其他人修改了与你相同的文件/行,并且在你打开拉取请求后已经合并了更改。</ p >
289
288
< p class ="last "> 在这种情况下,你需要通过手动编辑冲突文件来修复冲突(运行 < code class ="docutils literal "> < span class ="pre "> git</ span > < span class ="pre "> status</ span > </ code > 查看这些文件)。
290
289
修复冲突后,使用 < code class ="docutils literal "> < span class ="pre "> git</ span > < span class ="pre "> add</ span > </ code > 添加它们,然后运行 < code class ="docutils literal "> < span class ="pre "> git</ span > < span class ="pre "> rebase</ span > < span class ="pre "> --continue</ span > </ code > 。</ p >
0 commit comments