CINXE.COM
Commit Messages - GNOME Project Handbook
<!doctype html> <html class="no-js" lang="en" data-content_root=""> <head><meta charset="utf-8"/> <meta name="viewport" content="width=device-width,initial-scale=1"/> <meta name="color-scheme" content="light dark"><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" /> <meta property="og:title" content="Commit Messages" /> <meta property="og:type" content="website" /> <meta property="og:url" content="https://handbook.gnome.org/development/commit-messages.html" /> <meta property="og:site_name" content="GNOME Project Handbook" /> <meta property="og:description" content="Commit messages provide context to changes that a diff cannot convey by itself. They help other people understand changes, and document the reasons behind changes when coming back to them after mon..." /> <meta property="og:image:width" content="1146" /> <meta property="og:image:height" content="600" /> <meta property="og:image" content="https://handbook.gnome.org/_images/social_previews/summary_development_commit-messages_bbb69056.png" /> <meta property="og:image:alt" content="Commit messages provide context to changes that a diff cannot convey by itself. They help other people understand changes, and document the reasons behind ch..." /> <meta name="description" content="Commit messages provide context to changes that a diff cannot convey by itself. They help other people understand changes, and document the reasons behind changes when coming back to them after mon..." /> <meta name="twitter:card" content="summary_large_image" /> <link rel="index" title="Index" href="../genindex.html" /><link rel="search" title="Search" href="../search.html" /><link rel="next" title="Building" href="building.html" /><link rel="prev" title="Change Submission" href="change-submission.html" /> <link rel="shortcut icon" href="../_static/handbook.ico"/><!-- Generated with Sphinx 6.2.1 and Furo 2024.01.29 --> <title>Commit Messages - GNOME Project Handbook</title> <link rel="stylesheet" type="text/css" href="../_static/pygments.css" /> <link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?digest=369552022d0b975c8e74270ce6eabe0fb7978f24" /> <link rel="stylesheet" type="text/css" href="../_static/styles/furo-extensions.css?digest=30d1aed668e5c3a91c3e3bf6a60b675221979f0e" /> <link rel="stylesheet" type="text/css" href="../_static/gnome.css" /> <style> body { --color-code-background: #f8f8f8; --color-code-foreground: black; --color-brand-primary: #4a86cf; --color-brand-content: #4a86cf; } @media not print { body[data-theme="dark"] { --color-code-background: #202020; --color-code-foreground: #d0d0d0; } @media (prefers-color-scheme: dark) { body:not([data-theme="light"]) { --color-code-background: #202020; --color-code-foreground: #d0d0d0; } } } </style> <!-- Matomo --> <script> var _paq = window._paq = window._paq || []; /* tracker methods like "setCustomDimension" should be called before "trackPageView" */ _paq.push(['trackPageView']); _paq.push(['enableLinkTracking']); (function() { var u="//webstats.gnome.org/"; _paq.push(['setTrackerUrl', u+'matomo.php']); _paq.push(['setSiteId', '46']); var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s); })(); </script> <!-- End Matomo Code --> </head> <body> <script> document.body.dataset.theme = localStorage.getItem("theme") || "auto"; </script> <svg xmlns="http://www.w3.org/2000/svg" style="display: none;"> <symbol id="svg-toc" viewBox="0 0 24 24"> <title>Contents</title> <svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 1024 1024"> <path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 0 0 0 13.8z"/> </svg> </symbol> <symbol id="svg-menu" viewBox="0 0 24 24"> <title>Menu</title> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-menu"> <line x1="3" y1="12" x2="21" y2="12"></line> <line x1="3" y1="6" x2="21" y2="6"></line> <line x1="3" y1="18" x2="21" y2="18"></line> </svg> </symbol> <symbol id="svg-arrow-right" viewBox="0 0 24 24"> <title>Expand</title> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-chevron-right"> <polyline points="9 18 15 12 9 6"></polyline> </svg> </symbol> <symbol id="svg-sun" viewBox="0 0 24 24"> <title>Light mode</title> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="feather-sun"> <circle cx="12" cy="12" r="5"></circle> <line x1="12" y1="1" x2="12" y2="3"></line> <line x1="12" y1="21" x2="12" y2="23"></line> <line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line> <line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line> <line x1="1" y1="12" x2="3" y2="12"></line> <line x1="21" y1="12" x2="23" y2="12"></line> <line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line> <line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line> </svg> </symbol> <symbol id="svg-moon" viewBox="0 0 24 24"> <title>Dark mode</title> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon"> <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z" /> </svg> </symbol> <symbol id="svg-sun-half" viewBox="0 0 24 24"> <title>Auto light/dark mode</title> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-shadow"> <path stroke="none" d="M0 0h24v24H0z" fill="none"/> <circle cx="12" cy="12" r="9" /> <path d="M13 12h5" /> <path d="M13 15h4" /> <path d="M13 18h1" /> <path d="M13 9h4" /> <path d="M13 6h1" /> </svg> </symbol> </svg> <input type="checkbox" class="sidebar-toggle" name="__navigation" id="__navigation"> <input type="checkbox" class="sidebar-toggle" name="__toc" id="__toc"> <label class="overlay sidebar-overlay" for="__navigation"></label> <label class="overlay toc-overlay" for="__toc"></label> <div class="page"> <header class="mobile-header"> <div class="header-left"> <label class="nav-overlay-icon" for="__navigation"> <i class="icon"><svg><use href="#svg-menu"></use></svg></i> </label> </div> <div class="header-center"> <a href="../index.html"><div class="brand">GNOME Project Handbook</div></a> </div> <div class="header-right"> <div class="theme-toggle-container theme-toggle-header"> <button class="theme-toggle"> <div class="visually-hidden">Toggle Light / Dark / Auto color theme</div> <svg class="theme-icon-when-auto"><use href="#svg-sun-half"></use></svg> <svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg> <svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg> </button> </div> <label class="toc-overlay-icon toc-header-icon" for="__toc"> <div class="visually-hidden">Toggle table of contents sidebar</div> <i class="icon"><svg><use href="#svg-toc"></use></svg></i> </label> </div> </header> <aside class="sidebar-drawer"> <div class="sidebar-container"> <div class="sidebar-sticky"><a class="sidebar-brand" href="../index.html"> <span class="sidebar-brand-text">GNOME Project Handbook</span> </a><form class="sidebar-search-container" method="get" action="../search.html" role="search"> <input class="sidebar-search" placeholder="Search" name="q" aria-label="Search"> <input type="hidden" name="check_keywords" value="yes"> <input type="hidden" name="area" value="default"> </form> <div id="searchbox"></div><div class="sidebar-scroll"><div class="sidebar-tree"> <ul class="current"> <li class="toctree-l1 has-children"><a class="reference internal" href="../get-in-touch.html">Get in Touch</a><input class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" role="switch" type="checkbox"/><label for="toctree-checkbox-1"><div class="visually-hidden">Toggle navigation of Get in Touch</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l2"><a class="reference internal" href="../get-in-touch/matrix.html">Matrix</a></li> <li class="toctree-l2"><a class="reference internal" href="../get-in-touch/discourse.html">Discourse</a></li> </ul> </li> <li class="toctree-l1 has-children"><a class="reference internal" href="../news.html">Project News</a><input class="toctree-checkbox" id="toctree-checkbox-2" name="toctree-checkbox-2" role="switch" type="checkbox"/><label for="toctree-checkbox-2"><div class="visually-hidden">Toggle navigation of Project News</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l2"><a class="reference internal" href="../news/planet-gnome.html">Planet GNOME</a></li> </ul> </li> <li class="toctree-l1"><a class="reference internal" href="../teams.html">Teams</a></li> <li class="toctree-l1"><a class="reference internal" href="../governance.html">Governance</a></li> <li class="toctree-l1 has-children"><a class="reference internal" href="../foundation.html">Foundation</a><input class="toctree-checkbox" id="toctree-checkbox-3" name="toctree-checkbox-3" role="switch" type="checkbox"/><label for="toctree-checkbox-3"><div class="visually-hidden">Toggle navigation of Foundation</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l2 has-children"><a class="reference internal" href="../foundation/board-of-directors.html">Board of Directors</a><input class="toctree-checkbox" id="toctree-checkbox-4" name="toctree-checkbox-4" role="switch" type="checkbox"/><label for="toctree-checkbox-4"><div class="visually-hidden">Toggle navigation of Board of Directors</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l3"><a class="reference internal" href="../foundation/board-of-directors/officers.html">Officers</a></li> <li class="toctree-l3"><a class="reference internal" href="../foundation/board-of-directors/previous-boards.html">Previous Boards</a></li> </ul> </li> <li class="toctree-l2 has-children"><a class="reference internal" href="../foundation/committees.html">Committees</a><input class="toctree-checkbox" id="toctree-checkbox-5" name="toctree-checkbox-5" role="switch" type="checkbox"/><label for="toctree-checkbox-5"><div class="visually-hidden">Toggle navigation of Committees</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l3"><a class="reference internal" href="../foundation/committees/circle.html">Circle Committee</a></li> <li class="toctree-l3"><a class="reference internal" href="../foundation/committees/coc.html">Code of Conduct Committee</a></li> <li class="toctree-l3"><a class="reference internal" href="../foundation/committees/compensation.html">Compensation Committee</a></li> <li class="toctree-l3"><a class="reference internal" href="../foundation/committees/executive.html">Executive Committee</a></li> <li class="toctree-l3"><a class="reference internal" href="../foundation/committees/finance.html">Finance Committee</a></li> <li class="toctree-l3"><a class="reference internal" href="../foundation/committees/governance.html">Governance Committee</a></li> <li class="toctree-l3"><a class="reference internal" href="../foundation/committees/governance.html#committee-charter">Committee Charter</a></li> <li class="toctree-l3"><a class="reference internal" href="../foundation/committees/internship.html">Internship Committee</a></li> <li class="toctree-l3"><a class="reference internal" href="../foundation/committees/membership-and-elections.html">Membership & Elections Committee</a></li> <li class="toctree-l3"><a class="reference internal" href="../foundation/committees/travel.html">Travel Committee</a></li> </ul> </li> <li class="toctree-l2"><a class="reference internal" href="../foundation/membership-benefits.html">Membership Benefits</a></li> </ul> </li> <li class="toctree-l1 has-children"><a class="reference internal" href="../infrastructure.html">Infrastructure</a><input class="toctree-checkbox" id="toctree-checkbox-6" name="toctree-checkbox-6" role="switch" type="checkbox"/><label for="toctree-checkbox-6"><div class="visually-hidden">Toggle navigation of Infrastructure</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l2"><a class="reference internal" href="../infrastructure/developer-access.html">Developer Access</a></li> <li class="toctree-l2 has-children"><a class="reference internal" href="../infrastructure/accounts.html">Accounts</a><input class="toctree-checkbox" id="toctree-checkbox-7" name="toctree-checkbox-7" role="switch" type="checkbox"/><label for="toctree-checkbox-7"><div class="visually-hidden">Toggle navigation of Accounts</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l3"><a class="reference internal" href="../infrastructure/accounts/managing-accounts.html">Managing Accounts</a></li> </ul> </li> <li class="toctree-l2"><a class="reference internal" href="../infrastructure/email-aliases.html">Email Aliases</a></li> <li class="toctree-l2"><a class="reference internal" href="../infrastructure/blog-hosting.html">Blog Hosting</a></li> <li class="toctree-l2 has-children"><a class="reference internal" href="../infrastructure/gitlab.html">GitLab</a><input class="toctree-checkbox" id="toctree-checkbox-8" name="toctree-checkbox-8" role="switch" type="checkbox"/><label for="toctree-checkbox-8"><div class="visually-hidden">Toggle navigation of GitLab</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l3"><a class="reference internal" href="../infrastructure/gitlab/hosting-requirements.html">Hosting Requirements</a></li> <li class="toctree-l3"><a class="reference internal" href="../infrastructure/gitlab/new-gnome-project.html">New GNOME Projects</a></li> </ul> </li> <li class="toctree-l2"><a class="reference internal" href="../infrastructure/ssh-keys.html">SSH Keys</a></li> <li class="toctree-l2"><a class="reference internal" href="../infrastructure/contact.html">Contact</a></li> </ul> </li> <li class="toctree-l1 has-children"><a class="reference internal" href="../release-planning.html">Release Planning</a><input class="toctree-checkbox" id="toctree-checkbox-9" name="toctree-checkbox-9" role="switch" type="checkbox"/><label for="toctree-checkbox-9"><div class="visually-hidden">Toggle navigation of Release Planning</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l2"><a class="reference internal" href="../release-planning/freezes.html">Freezes</a></li> <li class="toctree-l2"><a class="reference internal" href="../release-planning/release-team.html">Release Team</a></li> </ul> </li> <li class="toctree-l1 current has-children"><a class="reference internal" href="../development.html">Development</a><input checked="" class="toctree-checkbox" id="toctree-checkbox-10" name="toctree-checkbox-10" role="switch" type="checkbox"/><label for="toctree-checkbox-10"><div class="visually-hidden">Toggle navigation of Development</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul class="current"> <li class="toctree-l2"><a class="reference internal" href="change-submission.html">Change Submission</a></li> <li class="toctree-l2 current current-page"><a class="current reference internal" href="#">Commit Messages</a></li> <li class="toctree-l2"><a class="reference internal" href="building.html">Building</a></li> <li class="toctree-l2"><a class="reference internal" href="toolbx.html">Building With Toolbx</a></li> <li class="toctree-l2"><a class="reference internal" href="legal.html">Legal</a></li> </ul> </li> <li class="toctree-l1"><a class="reference internal" href="../testing.html">Testing</a></li> <li class="toctree-l1 has-children"><a class="reference internal" href="../issues.html">Issue Tracking</a><input class="toctree-checkbox" id="toctree-checkbox-11" name="toctree-checkbox-11" role="switch" type="checkbox"/><label for="toctree-checkbox-11"><div class="visually-hidden">Toggle navigation of Issue Tracking</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l2"><a class="reference internal" href="../issues/reporting.html">Issue Reporting</a></li> <li class="toctree-l2"><a class="reference internal" href="../issues/stack-traces.html">Stack Traces</a></li> <li class="toctree-l2"><a class="reference internal" href="../issues/management.html">Issue Management</a></li> <li class="toctree-l2"><a class="reference internal" href="../issues/review.html">Issue Review</a></li> <li class="toctree-l2"><a class="reference internal" href="../issues/stock-responses.html">Stock Responses</a></li> <li class="toctree-l2"><a class="reference internal" href="../issues/template.html">New Issue Template</a></li> </ul> </li> <li class="toctree-l1 has-children"><a class="reference internal" href="../maintainers.html">Maintainers</a><input class="toctree-checkbox" id="toctree-checkbox-12" name="toctree-checkbox-12" role="switch" type="checkbox"/><label for="toctree-checkbox-12"><div class="visually-hidden">Toggle navigation of Maintainers</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l2"><a class="reference internal" href="../maintainers/making-a-release.html">Making a Release</a></li> <li class="toctree-l2"><a class="reference internal" href="../maintainers/signing-releases.html">Release Signing</a></li> <li class="toctree-l2"><a class="reference internal" href="../maintainers/release-pipeline.html">Release Pipeline</a></li> <li class="toctree-l2"><a class="reference internal" href="../maintainers/branches.html">Branches</a></li> <li class="toctree-l2"><a class="reference internal" href="../maintainers/issue-management.html">Issue Management</a></li> </ul> </li> <li class="toctree-l1 has-children"><a class="reference internal" href="../events.html">Events</a><input class="toctree-checkbox" id="toctree-checkbox-13" name="toctree-checkbox-13" role="switch" type="checkbox"/><label for="toctree-checkbox-13"><div class="visually-hidden">Toggle navigation of Events</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l2"><a class="reference internal" href="../events/guadec.html">GUADEC</a></li> <li class="toctree-l2"><a class="reference internal" href="../events/gnome.asia.html">GNOME.Asia</a></li> <li class="toctree-l2 has-children"><a class="reference internal" href="../events/hackfests.html">Hackfests</a><input class="toctree-checkbox" id="toctree-checkbox-14" name="toctree-checkbox-14" role="switch" type="checkbox"/><label for="toctree-checkbox-14"><div class="visually-hidden">Toggle navigation of Hackfests</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l3"><a class="reference internal" href="../events/hackfests/organizing.html">Organize a Hackfest</a></li> <li class="toctree-l3"><a class="reference internal" href="../events/hackfests/template.html">Hackfest Template</a></li> </ul> </li> <li class="toctree-l2 has-children"><a class="reference internal" href="../events/travel.html">Travel</a><input class="toctree-checkbox" id="toctree-checkbox-15" name="toctree-checkbox-15" role="switch" type="checkbox"/><label for="toctree-checkbox-15"><div class="visually-hidden">Toggle navigation of Travel</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l3"><a class="reference internal" href="../events/travel/sponsorship-policy.html">Travel Sponsorship Policy</a></li> </ul> </li> </ul> </li> </ul> </div> </div> </div> </div> </aside> <div class="main"> <div class="content"> <div class="article-container"> <a href="#" class="back-to-top muted-link"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"> <path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8v12z"></path> </svg> <span>Back to top</span> </a> <div class="content-icon-container"> <div class="edit-this-page"> <a class="muted-link" href="https://gitlab.gnome.org/Teams/Websites/handbook.gnome.org/-/edit/main/source/development/commit-messages.rst" title="Edit this page"> <svg aria-hidden="true" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"/> <path d="M4 20h4l10.5 -10.5a1.5 1.5 0 0 0 -4 -4l-10.5 10.5v4" /> <line x1="13.5" y1="6.5" x2="17.5" y2="10.5" /> </svg> <span class="visually-hidden">Edit this page</span> </a> </div><div class="theme-toggle-container theme-toggle-content"> <button class="theme-toggle"> <div class="visually-hidden">Toggle Light / Dark / Auto color theme</div> <svg class="theme-icon-when-auto"><use href="#svg-sun-half"></use></svg> <svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg> <svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg> </button> </div> <label class="toc-overlay-icon toc-content-icon" for="__toc"> <div class="visually-hidden">Toggle table of contents sidebar</div> <i class="icon"><svg><use href="#svg-toc"></use></svg></i> </label> </div> <article role="main" id="furo-main-content"> <section id="commit-messages"> <h1>Commit Messages<a class="headerlink" href="#commit-messages" title="Permalink to this heading">#</a></h1> <p>Commit messages provide context to changes that a diff cannot convey by itself. They help other people understand changes, and document the reasons behind changes when coming back to them after months or years.</p> <p>This page provides general recommendations and guidelines that apply to most GNOME modules. Some modules have different or additional conventions, so it is recommended to check for project-specific documentation and look at existing commit messages before contributing.</p> <p>A more extensive documentation in line with the GNOME commit style including reasoning is available at <a class="reference external" href="http://web.archive.org/web/20231206233011/https://api.coala.io/en/latest/Developers/Writing_Good_Commits.html">the coala project</a>.</p> <section id="structure"> <h2>Structure<a class="headerlink" href="#structure" title="Permalink to this heading">#</a></h2> <p>Commit messages use the following structure:</p> <ol class="arabic simple"> <li><p>A brief description that summarizes the commit</p></li> <li><p>The main description (body)</p></li> <li><p>Links or references to related issues (optional)</p></li> </ol> <p>The different parts are separated by blank lines (two newlines).</p> <p>Dedicated tools like the <a class="reference external" href="https://apps.gnome.org/en/Commit/">Commit app</a> can help with the formatting.</p> </section> <section id="example"> <h2>Example<a class="headerlink" href="#example" title="Permalink to this heading">#</a></h2> <div class="highlight-text notranslate"><div class="highlight"><pre><span></span>tag: Short explanation of the commit Longer explanation explaining exactly what's changed and why, whether any external or private interfaces changed, what issue were fixed (with issue number if applicable) and so forth. Be concise but not too brief. Closes #1234 </pre></div> </div> </section> <section id="summary-line"> <h2>Summary line<a class="headerlink" href="#summary-line" title="Permalink to this heading">#</a></h2> <ul class="simple"> <li><p>A summary of the change itself, not the issue or effects/benefits (that goes in the description).</p></li> <li><p>Always a single sentence with no trailing period (full stop).</p></li> <li><p>Be sure to not exceed 72 characters; you can use ‘&’ instead of ‘and’ so the message gets shorter.</p></li> <li><p>Uses imperative present tense. For example use “Add Hindi translation” instead of “Added Hindi translation”.</p></li> <li><p>You can prefix the first line with one tag, to make it easier to know to which part of the module the commit applies. For example, a commit with “sound: Fix label alignments” in the <a class="reference external" href="https://gitlab.gnome.org/GNOME/gnome-control-center">Settings module</a> clearly applies to the sound panel.</p></li> </ul> </section> <section id="main-description"> <h2>Main description<a class="headerlink" href="#main-description" title="Permalink to this heading">#</a></h2> <ul class="simple"> <li><p>A detailed description of the change and the reasoning behind it. Consider the commit message as an email sent to the developers (or yourself, six months in the future) detailing <strong>why</strong> you changed something. There’s no need to specify the <strong>how</strong>: those who need to know can view the code changes alongside the commit message.</p></li> <li><p>Each line must not exceed 75 characters. There is no limit on the number of lines.</p></li> <li><p>Uses normal prose, punctuation and capitalization.</p></li> <li><p>If you use <code class="docutils literal notranslate"><span class="pre">git</span> <span class="pre">revert</span></code> command to undo a commit, git generates a default commit message specifying the hash and commit message of the commit you’re undoing, but this is not enough to know <em>why</em> you’re reverting it, so please add more comments to it.</p></li> </ul> </section> <section id="references"> <h2>References<a class="headerlink" href="#references" title="Permalink to this heading">#</a></h2> <ul> <li><p>If your commit is addressing an issue, use the <a class="reference external" href="https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically">GitLab syntax</a> to automatically close the issue when merging the commit with the upstream repository:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Closes</span> <span class="c1">#1234</span> <span class="n">Fixes</span> <span class="c1">#1234</span> <span class="n">Closes</span><span class="p">:</span> <span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">gitlab</span><span class="o">.</span><span class="n">gnome</span><span class="o">.</span><span class="n">org</span><span class="o">/</span><span class="n">GNOME</span><span class="o">/</span><span class="n">gtk</span><span class="o">/</span><span class="n">issues</span><span class="o">/</span><span class="mi">1234</span> </pre></div> </div> </li> <li><p>When committing code on behalf of others use the <code class="docutils literal notranslate"><span class="pre">--author</span></code> option and add a Signed-off-by line with <code class="docutils literal notranslate"><span class="pre">--signoff</span></code>:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">git</span> <span class="n">commit</span> <span class="o">-</span><span class="n">a</span> <span class="o">--</span><span class="n">author</span> <span class="s2">"Joe Coder <joe@coder.org>"</span> <span class="o">--</span><span class="n">signoff</span> </pre></div> </div> </li> </ul> </section> </section> </article> </div> <footer> <div class="related-pages"> <a class="next-page" href="building.html"> <div class="page-info"> <div class="context"> <span>Next</span> </div> <div class="title">Building</div> </div> <svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg> </a> <a class="prev-page" href="change-submission.html"> <svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg> <div class="page-info"> <div class="context"> <span>Previous</span> </div> <div class="title">Change Submission</div> </div> </a> </div> </footer> </div> <aside class="toc-drawer"> <div class="toc-sticky toc-scroll"> <div class="toc-title-container"> <span class="toc-title"> On this page </span> </div> <div class="toc-tree-container"> <div class="toc-tree"> <ul> <li><a class="reference internal" href="#">Commit Messages</a><ul> <li><a class="reference internal" href="#structure">Structure</a></li> <li><a class="reference internal" href="#example">Example</a></li> <li><a class="reference internal" href="#summary-line">Summary line</a></li> <li><a class="reference internal" href="#main-description">Main description</a></li> <li><a class="reference internal" href="#references">References</a></li> </ul> </li> </ul> </div> </div> </div> </aside> </div> </div><script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script> <script src="../_static/doctools.js"></script> <script src="../_static/sphinx_highlight.js"></script> <script src="../_static/scripts/furo.js"></script> </body> </html>