=5sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextEnglish}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget/maintainer/configure-gitmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget,/translations/zh_TW/maintainer/configure-gitmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget,/translations/it_IT/maintainer/configure-gitmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget,/translations/ja_JP/maintainer/configure-gitmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget,/translations/ko_KR/maintainer/configure-gitmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget,/translations/sp_SP/maintainer/configure-gitmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageChinese (Simplified)uh1h hh _documenthsourceNlineNubhnote)}(hX{此文件的目的是为让中文读者更容易阅读和理解,而不是作为一个分支。 因此, 如果您对此文件有任何意见或更新,请先尝试更新原始英文文件。 如果您发现本文档与原始文件有任何不同或者有翻译问题,请发建议或者补丁给 该文件的译者,或者请求中文文档维护者和审阅者的帮助。h]h paragraph)}(hX{此文件的目的是为让中文读者更容易阅读和理解,而不是作为一个分支。 因此, 如果您对此文件有任何意见或更新,请先尝试更新原始英文文件。 如果您发现本文档与原始文件有任何不同或者有翻译问题,请发建议或者补丁给 该文件的译者,或者请求中文文档维护者和审阅者的帮助。h]hX{此文件的目的是为让中文读者更容易阅读和理解,而不是作为一个分支。 因此, 如果您对此文件有任何意见或更新,请先尝试更新原始英文文件。 如果您发现本文档与原始文件有任何不同或者有翻译问题,请发建议或者补丁给 该文件的译者,或者请求中文文档维护者和审阅者的帮助。}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hh5Documentation/translations/zh_CN/disclaimer-zh_CN.rsthKhhubah}(h]h ]h"]h$]h&]uh1hhhhhhhhNubh field_list)}(hhh](hfield)}(hhh](h field_name)}(hOriginalh]hOriginal}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhY/var/lib/git/docbuild/linux/Documentation/translations/zh_CN/maintainer/configure-git.rsthKubh field_body)}(h+Documentation/maintainer/configure-git.rst h]h)}(h*Documentation/maintainer/configure-git.rsth]h*Documentation/maintainer/configure-git.rst}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhubah}(h]h ]h"]h$]h&]uh1hhhubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hhh](h)}(h译者h]h译者}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhKubh)}(h*吴想成 Wu XiangCheng h]h)}(h)吴想成 Wu XiangCheng h](h吴想成 Wu XiangCheng <}(hjhhhNhNubh reference)}(hbobwxc@email.cnh]hbobwxc@email.cn}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurimailto:bobwxc@email.cnuh1jhjubh>}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1hhhubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubeh}(h]h ]h"]h$]h&]uh1hhhhhhhhKubhtarget)}(h.. _configuregit_zh:h]h}(h]h ]h"]h$]h&]refidconfiguregit-zhuh1jDhKhhhhhhubhsection)}(hhh](htitle)}(h Git配置h]h Git配置}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1jWhjThhhhhK ubh)}(h-本章讲述了维护者级别的git配置。h]h-本章讲述了维护者级别的git配置。}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjThhubh)}(hXDocumentation/maintainer/pull-requests.rst 中使用的标记分支应使用开发人员的 GPG公钥进行签名。可以通过将 ``-u`` 标志传递给 ``git tag`` 来创建签名标记。 但是,由于 *通常* 对同一项目使用同一个密钥,因此可以设置::h](hDocumentation/maintainer/pull-requests.rst 中使用的标记分支应使用开发人员的 GPG公钥进行签名。可以通过将 }(hjuhhhNhNubhliteral)}(h``-u``h]h-u}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j}hjuubh 标志传递给 }(hjuhhhNhNubj~)}(h ``git tag``h]hgit tag}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j}hjuubh* 来创建签名标记。 但是,由于 }(hjuhhhNhNubhemphasis)}(h*通常*h]h通常}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjuubh; 对同一项目使用同一个密钥,因此可以设置:}(hjuhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjThhubh literal_block)}(h$git config user.signingkey "keyname"h]h$git config user.signingkey "keyname"}hjsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1jhhhKhjThhubh)}(hF或者手动编辑你的 ``.git/config`` 或 ``~/.gitconfig`` 文件::h](h或者手动编辑你的 }(hjhhhNhNubj~)}(h``.git/config``h]h .git/config}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j}hjubh 或 }(hjhhhNhNubj~)}(h``~/.gitconfig``h]h ~/.gitconfig}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j}hjubh 文件:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjThhubj)}(he[user] name = Jane Developer email = jd@domain.org signingkey = jd@domain.orgh]he[user] name = Jane Developer email = jd@domain.org signingkey = jd@domain.org}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhKhjThhubh)}(h2你可能需要告诉 ``git`` 去使用 ``gpg2``::h](h你可能需要告诉 }(hjhhhNhNubj~)}(h``git``h]hgit}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j}hjubh 去使用 }(hjhhhNhNubj~)}(h``gpg2``h]hgpg2}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1j}hjubh:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjThhubj)}(h%[gpg] program = /path/to/gpg2h]h%[gpg] program = /path/to/gpg2}hjAsbah}(h]h ]h"]h$]h&]jjuh1jhhhKhjThhubh)}(ha你可能也需要告诉 ``gpg`` 去使用哪个 ``tty`` (添加到你的shell rc文件中)::h](h你可能也需要告诉 }(hjOhhhNhNubj~)}(h``gpg``h]hgpg}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1j}hjOubh 去使用哪个 }(hjOhhhNhNubj~)}(h``tty``h]htty}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1j}hjOubh( (添加到你的shell rc文件中):}(hjOhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK"hjThhubj)}(hexport GPG_TTY=$(tty)h]hexport GPG_TTY=$(tty)}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhK$hjThhubjS)}(hhh](jX)}(h'创建链接到lore.kernel.org的提交h]h'创建链接到lore.kernel.org的提交}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jWhjhhhhhK(ubh)}(hXqhttp://lore.kernel.org 网站是所有涉及或影响内核开发的邮件列表的总存档。在这里 存储补丁存档是推荐的做法,当维护人员将补丁应用到子系统树时,最好提供一个指向 lore存档链接的标签,以便浏览提交历史的人可以找到某个更改背后的相关讨论和基本 原理。链接标签如下所示:h](j)}(hhttp://lore.kernel.orgh]hhttp://lore.kernel.org}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurijuh1jhjubhX[ 网站是所有涉及或影响内核开发的邮件列表的总存档。在这里 存储补丁存档是推荐的做法,当维护人员将补丁应用到子系统树时,最好提供一个指向 lore存档链接的标签,以便浏览提交历史的人可以找到某个更改背后的相关讨论和基本 原理。链接标签如下所示:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK*hjhhubh block_quote)}(h-Link: https://lore.kernel.org/r/ h]h)}(h,Link: https://lore.kernel.org/r/h](hLink: }(hjhhhNhNubj)}(hhttps://lore.kernel.org/rh]hhttps://lore.kernel.org/r}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurijuh1jhjubh /}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK/hjubah}(h]h ]h"]h$]h&]uh1jhhhK/hjhhubh)}(h`通过在git中添加以下钩子,可以将此配置为在发布 ``git am`` 时自动执行:h](hC通过在git中添加以下钩子,可以将此配置为在发布 }(hjhhhNhNubj~)}(h ``git am``h]hgit am}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j}hjubh 时自动执行:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK1hjhhubj)}(hX=$ git config am.messageid true $ cat >.git/hooks/applypatch-msg <<'EOF' #!/bin/sh . git-sh-setup perl -pi -e 's|^Message-Id:\s*]+)>?$|Link: https://lore.kernel.org/r/$1|g;' "$1" test -x "$GIT_DIR/hooks/commit-msg" && exec "$GIT_DIR/hooks/commit-msg" ${1+"$@"} : EOF $ chmod a+x .git/hooks/applypatch-msgh]hX=$ git config am.messageid true $ cat >.git/hooks/applypatch-msg <<'EOF' #!/bin/sh . git-sh-setup perl -pi -e 's|^Message-Id:\s*]+)>?$|Link: https://lore.kernel.org/r/$1|g;' "$1" test -x "$GIT_DIR/hooks/commit-msg" && exec "$GIT_DIR/hooks/commit-msg" ${1+"$@"} : EOF $ chmod a+x .git/hooks/applypatch-msg}hj sbah}(h]h ]h"]h$]h&]jjforcelanguagenonehighlight_args}uh1jhhhK3hjhhubeh}(h]lore-kernel-orgah ]h"]'创建链接到lore.kernel.org的提交ah$]h&]uh1jRhjThhhhhK(ubeh}(h](gitjQeh ]h"]( git配置configuregit_zheh$]h&]uh1jRhhhhhhhK expect_referenced_by_name}j+jFsexpect_referenced_by_id}jQjFsubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(jWN generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjUerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh، _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}jQ]jFasnameids}(j+jQj*j'j"ju nametypes}(j+j*j"uh}(jQjTj'jTjju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages]hsystem_message)}(hhh]h)}(hhh]h5Hyperlink target "configuregit-zh" is not referenced.}hjsbah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]levelKtypeINFOsourceh،lineKuh1juba transformerN include_log]=Documentation/translations/zh_CN/maintainer/configure-git.rst(NNNNta decorationNhhub.