<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Bash on FdyFox</title><link>https://fdyfox.com/tags/bash/</link><description>Recent content in Bash on FdyFox</description><generator>Hugo</generator><language>de-de</language><lastBuildDate>Thu, 22 Oct 2026 11:01:25 +0200</lastBuildDate><atom:link href="https://fdyfox.com/tags/bash/index.xml" rel="self" type="application/rss+xml"/><item><title>Selbsterziehung durch Hooks</title><link>https://fdyfox.com/posts/selbsterziehung-durch-hooks/</link><pubDate>Thu, 22 Oct 2026 09:30:00 +0200</pubDate><guid>https://fdyfox.com/posts/selbsterziehung-durch-hooks/</guid><description>&lt;p&gt;Ich habe ein paar Git-Hooks, die global für alle meine Repos gelten. Die Idee dahinter ist simple Selbsterziehung: Wenn ich mich nicht an die Regeln halte, lässt Git mich einfach nicht committen.&lt;/p&gt;
&lt;div class="highlight has-title"&gt;
&lt;span class="highlight__title"&gt;Hooks global aktivieren&lt;/span&gt;
&lt;pre class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;git config --global core.hooksPath ~/.config/git/hooks&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;Im Ordner liegen zwei Hooks:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;pre-commit&lt;/strong&gt; entfernt Leerzeichen am Zeilenende, sorgt für genau einen Zeilenumbruch am Dateiende und zählt bei Bedarf eine Versionsnummer hoch.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;commit-msg&lt;/strong&gt; prüft, ob die Commit-Nachricht dem &lt;a href="https://www.conventionalcommits.org/" target="_blank" rel="noopener noreferrer"&gt;Conventional-Commits&lt;/a&gt;-Format folgt, also &lt;code&gt;feat(scope): beschreibung&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Das funktioniert seit einer Weile gut. Dachte ich jedenfalls.&lt;/p&gt;</description></item></channel></rss>