aboutsummaryrefslogtreecommitdiff
path: root/build/git-patches/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'build/git-patches/index.html')
-rw-r--r--build/git-patches/index.html52
1 files changed, 52 insertions, 0 deletions
diff --git a/build/git-patches/index.html b/build/git-patches/index.html
new file mode 100644
index 0000000..3409f1e
--- /dev/null
+++ b/build/git-patches/index.html
@@ -0,0 +1,52 @@
+<!doctype html>
+<html lang="en" id="top">
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <link rel="icon" href="data:,">
+ <title>Applying Email-Based Git Patches in Evolution on Linux</title>
+ <link href="https://bt.ht/atom.xml" type="application/atom+xml" rel="alternate" title="Atom feed for blog posts" />
+ <style>*{box-sizing:border-box;}body{font-family:sans-serif;margin:0 auto;max-width:650px;padding:1rem;}img{max-width:100%;}pre{overflow:auto;}table{text-align:left;width:100%;}</style>
+</head>
+
+<nav>
+ <a href="#menu">Menu &darr;</a>
+</nav>
+
+<main>
+<h1>Applying Email-Based Git Patches in Evolution on Linux</h1>
+<p>2023-04-25</p>
+<p>Users who work with git patches through email most likely use a terminal-based program such as <code>aerc</code> or <code>mutt</code>. CLI email clients tend to have built-in support for easily applying patches directly to their local repos. But what about people who prefer to use graphical email apps?</p>
+<p>Lucky for us, it is actually fairly simple to replicate a similar workflow to that of a CLI client. In this example I will be focusing on the Evolution email client, but the core principles should work in most other GUIs.</p>
+<h2>The Basics</h2>
+<blockquote><p><strong>Note:</strong> The following assumes you already have <code>git</code> installed and setup on your existing system.</p>
+</blockquote>
+<p>I find it best to first create a top-level folder on your system named <code>patches</code>. We will use this folder as a temporary location for reviewing any <code>git</code> patches submitted via email. I normally place this under <code>/home/&lt;username&gt;/patches</code>.</p>
+<p>Next, locate the email patch in Evolution and right-click on it. Select "Save as mbox..." and place this file inside your newly created <code>patches</code> folder.</p>
+<p>Now simply open your terminal, navigate to your project and run:</p>
+<pre><code>git am &lt;path-to-patches-folder&gt;/&lt;patch-filename&gt;.mbox
+</code></pre>
+<p>This should apply the patch directly to your project without issue. You are now free to test these changes locally. If everything looks good, you're able to instantly push these changes remotely.</p>
+<p>Done and done.</p>
+<p>Feel free to purge your <code>patches</code> folder regularly or keep them around for future reference if you prefer!</p>
+<footer role="contentinfo">
+ <h2>Menu Navigation</h2>
+ <ul id="menu">
+ <li><a href="/">Home</a></li>
+ <li><a href="/projects">Projects</a></li>
+ <li><a href="/uses">Uses</a></li>
+ <li><a href="/wiki">Wiki</a></li>
+ <li><a href="/resume">Resume</a></li>
+ <li><a href="/colophon">Colophon</a></li>
+ <li><a href="/now">Now</a></li>
+ <li><a href="/donate">Donate</a></li>
+ <li><a href="/atom.xml">RSS</a></li>
+ <li><a href="#top">&uarr; Top of the page</a></li>
+ </ul>
+ <small>
+ Built with <a href="https://git.sr.ht/~bt/barf">barf</a>. <br>
+ Maintained with ♥ for the web. <br>
+ Proud supporter of <a href="https://usefathom.com/ref/DKHJVX">Fathom</a> &amp; <a href="https://nextdns.io/?from=74d3p3h8">NextDNS</a>. <br>
+ The content for this site is <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>.<br> The <a href="https://git.sr.ht/~bt/bt.ht">code for this site</a> is <a href="https://git.sr.ht/~bt/bt.ht/tree/master/item/LICENSE">MIT</a>.
+ </small>
+</footer> \ No newline at end of file