From dcfb172704f3afb68a30425029ec834be2883274 Mon Sep 17 00:00:00 2001 From: bt Date: Sat, 8 Jun 2024 13:22:19 -0400 Subject: More content porting, on-going markdown changes for lowdown support --- build/mail/index.html | 49 ++++++++++++++++++++++++++++--------------------- 1 file changed, 28 insertions(+), 21 deletions(-) (limited to 'build/mail') diff --git a/build/mail/index.html b/build/mail/index.html index 0b086e8..a000d97 100644 --- a/build/mail/index.html +++ b/build/mail/index.html @@ -1,44 +1,51 @@ - + Working with `git` Patches in Apple Mail - - + + +
-

Working with git Patches in Apple Mail

+

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.

+ +
+

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, 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:

-

- The Apple Mail sidebar with the Patches folder present -
The Apple Mail sidebar with the "Patches" folder present
-

-

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.

+ +

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:

+ +

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:

-

- The contents of the saved Patches mailbox folder -
The contents of the saved Patches mailbox folder
-

+

Once saved, open your terminal, navigate to the project you wish to apply this new patch to:

-
cd my-path/very-cool-project
+
+
cd my-path/very-cool-project
 
+

and then run:

-
git apply ~/Patches/<saved-patches-mailbox-folder>/mbox
+
+
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!

+ +

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!