diff options
author | Bradley Taunt <brad@bt.ht> | 2023-11-27 12:25:51 -0500 |
---|---|---|
committer | Bradley Taunt <brad@bt.ht> | 2023-11-27 12:25:51 -0500 |
commit | 14d227d46a2177a8928333894252d6299f531097 (patch) | |
tree | d41d48383d012f53823c9816a820e4e88c572c41 /posts/mail.md | |
parent | f6eed1a8c2f4fbf91fac9edd11e50f5c0ec939a2 (diff) |
Trying to render posts all at once
Diffstat (limited to 'posts/mail.md')
-rw-r--r-- | posts/mail.md | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/posts/mail.md b/posts/mail.md new file mode 100644 index 0000000..9a58f8e --- /dev/null +++ b/posts/mail.md @@ -0,0 +1,42 @@ +# Working with `git` Patches in Apple Mail + +2023-05-11 + +> **Before we begin**: You could likely automate this process in a more streamlined way, but for most use cases this workflow should be fine. + +I recently covered how to [work with git email patches in Evolution on Linux](/git-patches), so I thought it would make sense to walk through a similar workflow for those using Apple Mail on MacOS. The idea is essentially the same, with just a little extra work involved. + +## Create a "Patches" Mailbox + +The first thing you'll need to do is make a new `Patches` mailbox folder inside your existing mail account. Once done, your default Mail sidebar should look similar to the following: + +<figure> + <img src="/public/images/apple-mail-1.png" alt="The Apple Mail sidebar with the Patches folder present"> + <figcaption>The Apple Mail sidebar with the "Patches" folder present</figcaption> +</figure> + +## Applying Patches + +Now navigate to the email message containing a `git` patch. Right-click and select *Move to* > *Patches*. Now in the sidebar, right-click your *Patches* folder and select *Export Mailbox...*. You'll be prompted to save this folder locally. I suggest having a top-level folder named **Patches** to make things consistent. + +Inside this folder you should see something similar to the following structure: + +<figure> + <img src="/public/images/apple-mail-2.png" alt="The contents of the saved Patches mailbox folder"> + <figcaption>The contents of the saved Patches mailbox folder</figcaption> +</figure> + +Once saved, open your terminal, navigate to the project you wish to apply this new patch to: + +``` +cd my-path/very-cool-project +``` + +and then run: + +``` +git apply ~/Patches/<saved-patches-mailbox-folder>/mbox +``` + +Congrats! You've successfully applied a git email patch through Apple Mail! Well, kind of. The terminal did most of the *real* work. Just be sure to periodically *purge* your local *Patches* folder to keep things clean! + |