commits.html 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. <!DOCTYPE html>
  2. <html lang="en" data-content_root="../">
  3. <head>
  4. <meta charset="utf-8" />
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  6. <meta name="viewport" content="width=device-width, initial-scale=1">
  7. <title>Git Commits &amp; Change Management &#8212; SearXNG Documentation (2025.5.16+1b08324f2)</title>
  8. <link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=6625fa76" />
  9. <link rel="stylesheet" type="text/css" href="../_static/searxng.css?v=52e4ff28" />
  10. <script src="../_static/documentation_options.js?v=6450edb5"></script>
  11. <script src="../_static/doctools.js?v=9a2dae69"></script>
  12. <script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
  13. <script data-project="searxng" data-version="2025.5.16+1b08324f2" src="../_static/describe_version.js?v=fa7f30d0"></script>
  14. <link rel="index" title="Index" href="../genindex.html" />
  15. <link rel="search" title="Search" href="../search.html" />
  16. <link rel="next" title="Runtime Management" href="rtm_asdf.html" />
  17. <link rel="prev" title="Development Quickstart" href="quickstart.html" />
  18. </head><body>
  19. <div class="related" role="navigation" aria-label="Related">
  20. <h3>Navigation</h3>
  21. <ul>
  22. <li class="right" style="margin-right: 10px">
  23. <a href="../genindex.html" title="General Index"
  24. accesskey="I">index</a></li>
  25. <li class="right" >
  26. <a href="../py-modindex.html" title="Python Module Index"
  27. >modules</a> |</li>
  28. <li class="right" >
  29. <a href="rtm_asdf.html" title="Runtime Management"
  30. accesskey="N">next</a> |</li>
  31. <li class="right" >
  32. <a href="quickstart.html" title="Development Quickstart"
  33. accesskey="P">previous</a> |</li>
  34. <li class="nav-item nav-item-0"><a href="../index.html">SearXNG Documentation (2025.5.16+1b08324f2)</a> &#187;</li>
  35. <li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Developer documentation</a> &#187;</li>
  36. <li class="nav-item nav-item-this"><a href="">Git Commits &amp; Change Management</a></li>
  37. </ul>
  38. </div>
  39. <div class="document">
  40. <div class="documentwrapper">
  41. <div class="bodywrapper">
  42. <div class="body" role="main">
  43. <section id="git-commits-change-management">
  44. <span id="create-commit"></span><h1>Git Commits &amp; Change Management<a class="headerlink" href="#git-commits-change-management" title="Link to this heading">¶</a></h1>
  45. <aside class="sidebar">
  46. <p class="sidebar-title">Create good commits!</p>
  47. <ul class="simple">
  48. <li><p><a class="reference external" href="https://www.conventionalcommits.org/">Conventional Commits</a></p></li>
  49. <li><p><a class="reference external" href="https://wiki.openstack.org/wiki/GitCommitMessages#Structural_split_of_changes">Structural split of changes</a></p></li>
  50. <li><p><a class="reference external" href="https://wiki.openstack.org/wiki/GitCommitMessages">Git Commit Good Practice</a></p></li>
  51. </ul>
  52. </aside>
  53. <p>A commit and its commit message are among the most important information
  54. available to a developer for bug fixing and further development. A commit is a
  55. change and changes have a context (a change request).</p>
  56. <p>In a SCM system (git), the change history is derived from the commit history. A
  57. commit message is therefore part of the documentation for change management and
  58. thus elementary for the traceability of changes.</p>
  59. <p><strong>What a commit is not</strong>: <em>A commit to an SCM system is not used to save files!</em></p>
  60. <p>A commit should always have a context and the commit message describes what is
  61. to be changed in that context, just as a function description should describe
  62. what the intention and the goal of the function is, a commit message should
  63. describe what the intention and the goal of that commit is.</p>
  64. <p>The commit messages form the history and are the first and therefore most
  65. important information a developer has when he has to research when and why a
  66. change had to be made and how it was made (what the goal was).</p>
  67. <p>Like any text, a commit message should be written for the reader and not from
  68. the perspective of the author.</p>
  69. <p>When scrolling through the history, the first thing one see is the title of the
  70. commit message. Therefore the title should describe the change as briefly and
  71. precisely as possible … followed by a blank line and then a somewhat detailed
  72. description of the change.</p>
  73. <hr class="docutils" />
  74. <p>The follwing rules should be in mind, when creating a commit:</p>
  75. <ul class="simple">
  76. <li><p><strong>Commit history should be read like a history book.</strong></p></li>
  77. <li><p><strong>Commit messages are for the reader not for the author of the commit.</strong></p></li>
  78. <li><p><strong>A commit is the atomic code-modification of a change in change management.</strong></p></li>
  79. <li><p><strong>Think about which descriptions from your PR might belong in the commit message.</strong></p></li>
  80. <li><p><strong>The maximum line length in a commit message is 80 characters.</strong></p></li>
  81. </ul>
  82. <hr class="docutils" />
  83. <p>Choose meaningful commit messages:</p>
  84. <blockquote>
  85. <div><div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">[</span><span class="nb">type</span><span class="p">]</span> <span class="n">optional</span> <span class="n">scope</span><span class="p">:</span> <span class="n">description</span>
  86. <span class="p">[</span><span class="n">body</span><span class="p">]</span>
  87. <span class="p">[</span><span class="n">optional</span> <span class="n">trailers</span><span class="p">]</span>
  88. </pre></div>
  89. </div>
  90. </div></blockquote>
  91. <dl class="simple">
  92. <dt><code class="docutils literal notranslate"><span class="pre">[type]</span></code>:</dt><dd><p>Commits MUST be prefixed with a type .. <code class="docutils literal notranslate"><span class="pre">feat</span></code>, <code class="docutils literal notranslate"><span class="pre">fix</span></code>, <code class="docutils literal notranslate"><span class="pre">refactor</span></code>,
  93. <code class="docutils literal notranslate"><span class="pre">mod</span></code>, <code class="docutils literal notranslate"><span class="pre">upd</span></code>, <code class="docutils literal notranslate"><span class="pre">doc</span></code>, <code class="docutils literal notranslate"><span class="pre">l10n</span></code>, <code class="docutils literal notranslate"><span class="pre">build</span></code> ..</p>
  94. </dd>
  95. <dt><code class="docutils literal notranslate"><span class="pre">[body]</span></code></dt><dd><p><a class="reference external" href="https://wiki.openstack.org/wiki/GitCommitMessages#Information_in_commit_messages">Information in commit messages</a></p>
  96. </dd>
  97. <dt><code class="docutils literal notranslate"><span class="pre">[optional</span> <span class="pre">trailers]</span></code>:</dt><dd><ul class="simple">
  98. <li><p><a class="reference external" href="https://git-scm.com/docs/git-commit#Documentation/git-commit.txt-code--signoffcode">Signed-off-by</a>: certify that the committer has the rights to submit the
  99. work under the project’s license. That the developer has this right is a
  100. prerequisite for a merge. If the <a class="reference external" href="https://git-scm.com/docs/git-commit#Documentation/git-commit.txt-code--signoffcode">Signed-off-by</a> is not set in the
  101. commit, the contributor enters his <cite>Developer’s Certificate of Origin</cite> at
  102. the latest when creating a PR!</p></li>
  103. <li><p>Closes: Link to the bug report or the bug number (e.g. <code class="docutils literal notranslate"><span class="pre">Closes:</span> <span class="pre">#10</span></code>)</p></li>
  104. <li><p><a class="reference external" href="https://docs.github.com/en/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-with-multiple-authors">Co-authored-by</a>: email address of the co-author</p></li>
  105. <li><p>Reported-by: email address (if there is no bug report)</p></li>
  106. <li><p>Suggested-by: email address (if there is no bug report)</p></li>
  107. </ul>
  108. </dd>
  109. </dl>
  110. <hr class="docutils" />
  111. <p>To give examples at hand, here are a few commits. Follow the links to see the
  112. full commit messages:</p>
  113. <dl class="simple">
  114. <dt><a class="extlink-patch reference external" href="https://github.com/searxng/searxng/commit/44d941c93">#44d941c93</a></dt><dd><p><code class="docutils literal notranslate"><span class="pre">[fix]</span> <span class="pre">mojeek</span> <span class="pre">web</span> <span class="pre">engine:</span> <span class="pre">don't</span> <span class="pre">add</span> <span class="pre">empty</span> <span class="pre">fmt</span> <span class="pre">argument</span> <span class="pre">for</span> <span class="pre">web</span> <span class="pre">searches</span></code></p>
  115. </dd>
  116. <dt><a class="extlink-patch reference external" href="https://github.com/searxng/searxng/commit/feb15e387">#feb15e387</a></dt><dd><p><code class="docutils literal notranslate"><span class="pre">[fix]</span> <span class="pre">brave.news</span> <span class="pre">engine:</span> <span class="pre">response</span> <span class="pre">is</span> <span class="pre">HTML</span> <span class="pre">and</span> <span class="pre">no</span> <span class="pre">longer</span> <span class="pre">JSON</span></code></p>
  117. </dd>
  118. <dt><a class="extlink-patch reference external" href="https://github.com/searxng/searxng/commit/bdfe1c2a1">#bdfe1c2a1</a></dt><dd><p><code class="docutils literal notranslate"><span class="pre">[mod]</span> <span class="pre">engines:</span> <span class="pre">migration</span> <span class="pre">of</span> <span class="pre">the</span> <span class="pre">individual</span> <span class="pre">cache</span> <span class="pre">solutions</span> <span class="pre">to</span> <span class="pre">EngineCache</span></code></p>
  119. </dd>
  120. </dl>
  121. </section>
  122. <div class="clearer"></div>
  123. </div>
  124. </div>
  125. </div>
  126. <span id="sidebar-top"></span>
  127. <div class="sphinxsidebar" role="navigation" aria-label="Main">
  128. <div class="sphinxsidebarwrapper">
  129. <p class="logo"><a href="../index.html">
  130. <img class="logo" src="../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/>
  131. </a></p>
  132. <h3><a href="../index.html">Table of Contents</a></h3>
  133. <ul class="current">
  134. <li class="toctree-l1"><a class="reference internal" href="../user/index.html">User information</a></li>
  135. <li class="toctree-l1"><a class="reference internal" href="../own-instance.html">Why use a private instance?</a></li>
  136. <li class="toctree-l1"><a class="reference internal" href="../admin/index.html">Administrator documentation</a></li>
  137. <li class="toctree-l1 current"><a class="reference internal" href="index.html">Developer documentation</a><ul class="current">
  138. <li class="toctree-l2"><a class="reference internal" href="quickstart.html">Development Quickstart</a></li>
  139. <li class="toctree-l2 current"><a class="current reference internal" href="#">Git Commits &amp; Change Management</a></li>
  140. <li class="toctree-l2"><a class="reference internal" href="rtm_asdf.html">Runtime Management</a></li>
  141. <li class="toctree-l2"><a class="reference internal" href="contribution_guide.html">How to contribute</a></li>
  142. <li class="toctree-l2"><a class="reference internal" href="extended_types.html">Extended Types</a></li>
  143. <li class="toctree-l2"><a class="reference internal" href="engines/index.html">Engine Implementations</a></li>
  144. <li class="toctree-l2"><a class="reference internal" href="result_types/index.html">Result Types</a></li>
  145. <li class="toctree-l2"><a class="reference internal" href="templates.html">Simple Theme Templates</a></li>
  146. <li class="toctree-l2"><a class="reference internal" href="search_api.html">Search API</a></li>
  147. <li class="toctree-l2"><a class="reference internal" href="plugins/index.html">Plugins</a></li>
  148. <li class="toctree-l2"><a class="reference internal" href="answerers/index.html">Answerers</a></li>
  149. <li class="toctree-l2"><a class="reference internal" href="translation.html">Translation</a></li>
  150. <li class="toctree-l2"><a class="reference internal" href="lxcdev.html">Developing in Linux Containers</a></li>
  151. <li class="toctree-l2"><a class="reference internal" href="makefile.html">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
  152. <li class="toctree-l2"><a class="reference internal" href="reST.html">reST primer</a></li>
  153. <li class="toctree-l2"><a class="reference internal" href="searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li>
  154. </ul>
  155. </li>
  156. <li class="toctree-l1"><a class="reference internal" href="../utils/index.html">DevOps tooling box</a></li>
  157. <li class="toctree-l1"><a class="reference internal" href="../src/index.html">Source-Code</a></li>
  158. </ul>
  159. <h3>Project Links</h3>
  160. <ul>
  161. <li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
  162. <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
  163. <li><a href="https://searx.space">Public instances</a>
  164. <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a>
  165. </ul><h3>Navigation</h3>
  166. <ul>
  167. <li><a href="../index.html">Overview</a>
  168. <ul>
  169. <li><a href="index.html">Developer documentation</a>
  170. <ul>
  171. <li>Previous: <a href="quickstart.html" title="previous chapter">Development Quickstart</a>
  172. <li>Next: <a href="rtm_asdf.html" title="next chapter">Runtime Management</a></ul>
  173. </li>
  174. </ul>
  175. </li>
  176. </ul>
  177. <search id="searchbox" style="display: none" role="search">
  178. <h3 id="searchlabel">Quick search</h3>
  179. <div class="searchformwrapper">
  180. <form class="search" action="../search.html" method="get">
  181. <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
  182. <input type="submit" value="Go" />
  183. </form>
  184. </div>
  185. </search>
  186. <script>document.getElementById('searchbox').style.display = "block"</script>
  187. <div role="note" aria-label="source link">
  188. <h3>This Page</h3>
  189. <ul class="this-page-menu">
  190. <li><a href="../_sources/dev/commits.rst.txt"
  191. rel="nofollow">Show Source</a></li>
  192. </ul>
  193. </div>
  194. </div>
  195. </div>
  196. <div class="clearer"></div>
  197. </div>
  198. <div class="footer" role="contentinfo">
  199. &#169; Copyright SearXNG team.
  200. </div>
  201. </body>
  202. </html>