|
176 | 176 | <li class="toctree-l3"><a class="reference internal" href="#cola-color-add">cola.color.add</a></li> |
177 | 177 | <li class="toctree-l3"><a class="reference internal" href="#cola-color-remove">cola.color.remove</a></li> |
178 | 178 | <li class="toctree-l3"><a class="reference internal" href="#cola-color-header">cola.color.header</a></li> |
| 179 | +<li class="toctree-l3"><a class="reference internal" href="#commit-cleanup">commit.cleanup</a></li> |
| 180 | +<li class="toctree-l3"><a class="reference internal" href="#core-commentchar">core.commentChar</a></li> |
179 | 181 | <li class="toctree-l3"><a class="reference internal" href="#core-hookspath">core.hooksPath</a></li> |
180 | 182 | <li class="toctree-l3"><a class="reference internal" href="#gui-diffcontext">gui.diffcontext</a></li> |
181 | 183 | <li class="toctree-l3"><a class="reference internal" href="#gui-displayuntracked">gui.displayuntracked</a></li> |
|
210 | 212 | <li class="toctree-l3"><a class="reference internal" href="#guitool-name-shortcut">guitool.<name>.shortcut</a></li> |
211 | 213 | </ul> |
212 | 214 | </li> |
| 215 | +<li class="toctree-l2"><a class="reference internal" href="#setting-up-credential-helpers">SETTING UP CREDENTIAL HELPERS</a></li> |
213 | 216 | <li class="toctree-l2"><a class="reference internal" href="#setting-up-gpg-for-signed-commits">SETTING UP GPG FOR SIGNED COMMITS</a><ul> |
214 | 217 | <li class="toctree-l3"><a class="reference internal" href="#install-gpg-agent-and-friends">Install gpg-agent and friends</a></li> |
215 | 218 | <li class="toctree-l3"><a class="reference internal" href="#configure-gpg-agent-and-a-pin-entry-program">Configure gpg-agent and a pin-entry program</a></li> |
@@ -1148,6 +1151,42 @@ <h3>cola.color.header<a class="headerlink" href="#cola-color-header" title="Perm |
1148 | 1151 | </pre></div> |
1149 | 1152 | </div> |
1150 | 1153 | </section> |
| 1154 | +<section id="commit-cleanup"> |
| 1155 | +<h3>commit.cleanup<a class="headerlink" href="#commit-cleanup" title="Permalink to this heading"></a></h3> |
| 1156 | +<p>Configure whether commit messages should be stripped of whitespace and comments.</p> |
| 1157 | +<p>Valid values are <code class="docutils literal notranslate"><span class="pre">strip</span></code>, <code class="docutils literal notranslate"><span class="pre">whitespace</span></code>, <code class="docutils literal notranslate"><span class="pre">verbatim</span></code>, <code class="docutils literal notranslate"><span class="pre">scissors</span></code> or <code class="docutils literal notranslate"><span class="pre">default</span></code>.</p> |
| 1158 | +<p>The <code class="docutils literal notranslate"><span class="pre">default</span></code> mode uses the <code class="docutils literal notranslate"><span class="pre">whitespace</span></code> mode when committing through Git Cola |
| 1159 | +and the <code class="docutils literal notranslate"><span class="pre">strip</span></code> mode when committing using the <code class="docutils literal notranslate"><span class="pre">git</span> <span class="pre">commit</span></code> command-line.</p> |
| 1160 | +<ul> |
| 1161 | +<li><p><code class="docutils literal notranslate"><span class="pre">strip</span></code> - Strip leading and trailing empty lines, trailing whitespace, |
| 1162 | +commentary and collapse consecutive empty lines.</p></li> |
| 1163 | +<li><p><code class="docutils literal notranslate"><span class="pre">whitespace</span></code> - Same as strip except <code class="docutils literal notranslate"><span class="pre">#</span> <span class="pre">commentary</span></code> is not removed. |
| 1164 | +This is the <code class="docutils literal notranslate"><span class="pre">default</span></code> behavior when committing through <cite>Git Cola</cite>.</p></li> |
| 1165 | +<li><p><code class="docutils literal notranslate"><span class="pre">verbatim</span></code> - Do not change the message at all.</p></li> |
| 1166 | +<li><p><code class="docutils literal notranslate"><span class="pre">scissors</span></code> - Same as whitespace except that everything from (and including) |
| 1167 | +the line found below is truncated, if the message is to be edited. |
| 1168 | +“#” can be customized with <code class="docutils literal notranslate"><span class="pre">core.commentChar</span></code>:</p> |
| 1169 | +<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1"># ------------------------ >8 ------------------------</span> |
| 1170 | +<span class="n">Scissor</span><span class="o">-</span><span class="n">lines</span> <span class="ow">and</span> <span class="nb">all</span> <span class="n">following</span> <span class="n">lines</span> <span class="n">are</span> <span class="n">removed</span><span class="o">.</span> |
| 1171 | +</pre></div> |
| 1172 | +</div> |
| 1173 | +</li> |
| 1174 | +</ul> |
| 1175 | +<p>Changing the mode to <code class="docutils literal notranslate"><span class="pre">whitespace</span></code> can be useful when you always want to keep |
| 1176 | +lines that begin with comment character <code class="docutils literal notranslate"><span class="pre">#</span></code> in your log message, even when |
| 1177 | +committing using the command-line <code class="docutils literal notranslate"><span class="pre">git</span> <span class="pre">commit</span></code>.</p> |
| 1178 | +<p>On the contrary, if you always want to always strip comments, even when |
| 1179 | +committing through Git Cola, then configure <code class="docutils literal notranslate"><span class="pre">commit.cleanup</span></code> to <code class="docutils literal notranslate"><span class="pre">strip</span></code>.</p> |
| 1180 | +<p>Please see the <a class="reference external" href="https://git-scm.com/docs/git-commit#Documentation/git-commit.txt---cleanupltmodegt">git commit cleanup mode documentation</a> |
| 1181 | +for more details.</p> |
| 1182 | +</section> |
| 1183 | +<section id="core-commentchar"> |
| 1184 | +<h3>core.commentChar<a class="headerlink" href="#core-commentchar" title="Permalink to this heading"></a></h3> |
| 1185 | +<p>Commit messages can contain comments that start with this character. |
| 1186 | +Defaults to <code class="docutils literal notranslate"><span class="pre">#</span></code>.</p> |
| 1187 | +<p>Please see the <a class="reference external" href="https://git-scm.com/docs/git-config#Documentation/git-config.txt-corecommentChar">git config documentation</a> |
| 1188 | +for more details.</p> |
| 1189 | +</section> |
1151 | 1190 | <section id="core-hookspath"> |
1152 | 1191 | <h3>core.hooksPath<a class="headerlink" href="#core-hookspath" title="Permalink to this heading"></a></h3> |
1153 | 1192 | <p>Hooks are programs you can place in a hooks directory to trigger actions at |
@@ -1346,6 +1385,13 @@ <h3>guitool.<name>.shortcut<a class="headerlink" href="#guitool-name-short |
1346 | 1385 | is used.</p> |
1347 | 1386 | </section> |
1348 | 1387 | </section> |
| 1388 | +<section id="setting-up-credential-helpers"> |
| 1389 | +<h2>SETTING UP CREDENTIAL HELPERS<a class="headerlink" href="#setting-up-credential-helpers" title="Permalink to this heading"></a></h2> |
| 1390 | +<p>Git has robust support for automatically handling credentials.</p> |
| 1391 | +<p>The recommended approach is to use SSH keys and an SSH agent, but any of the core Git |
| 1392 | +Credentials helpers will get used automatically by Git Cola.</p> |
| 1393 | +<p>See <a class="reference external" href="https://git-scm.com/doc/credential-helpers">https://git-scm.com/doc/credential-helpers</a> for more details.</p> |
| 1394 | +</section> |
1349 | 1395 | <section id="setting-up-gpg-for-signed-commits"> |
1350 | 1396 | <h2>SETTING UP GPG FOR SIGNED COMMITS<a class="headerlink" href="#setting-up-gpg-for-signed-commits" title="Permalink to this heading"></a></h2> |
1351 | 1397 | <p>When creating signed commits, <cite>gpg</cite> will attempt to read your password from the |
|
0 commit comments