"value":"\n <p>A major addition to my Git workflow has been the ability to interactively add hunks of code to be committed.<\/p>\n\n<p>There's <code>git add -i<\/code> to interactively add, though I usually go straight to <code>git add -p<\/code> to use <code>patch<\/code>.<\/p>\n\n<p>This will ask you to confirm if you want to add each hunk to the commit (a.k.a. the staging area) or not.<\/p>\n\n<p>For example, here's the prompt I get whilst working on the post for this email:<\/p>\n\n<pre><code class=\"shell\">diff --git a\/source\/_daily_emails\/2024-05-06.md b\/source\/_daily_emails\/2024-05-06.md\nindex 42fe48f..ef36a2b 100644\n--- a\/source\/_daily_emails\/2024-05-06.md\n+++ b\/source\/_daily_emails\/2024-05-06.md\n@@ -4,10 +4,12 @@ date: 2024-05-06\n permalink: daily\/2024\/05\/06\/interactive-staging\n tags:\n - software-development\n- # - drupal\n- # - php\n- # - podcast\n+ - git\n cta: ~\n snippet: |\n TODO\n ---\n+\n+A major addition to my Git workflow has been the ability to interactively add hunks of code to be committed.\n+\n+There's `git add -i` to interactively add, though I usually go straight to `git add -p` to use `patch`.\n+There's `git add -i` to interactively add, though I usually go straight to `git add -p` to use `patch`.\n(1\/1) Stage this hunk [y,n,q,a,d,s,e,?]?\n<\/code><\/pre>\n\n<p>I can add the whole hunk, split it into smaller hunks, add all the hunks in the file or ignore this hunk and later hunks in the file.<\/p>\n\n<p>Then the process is repeated for any following hunks.<\/p>\n\n<p>This means I can add the relevant hunks to craft the commit I want and I can keep my commits small and meaningful, and easy to revert if there is an issue.<\/p>\n\n ",
"format":"full_html",
"processed":"\n <p>A major addition to my Git workflow has been the ability to interactively add hunks of code to be committed.<\/p>\n\n<p>There's <code>git add -i<\/code> to interactively add, though I usually go straight to <code>git add -p<\/code> to use <code>patch<\/code>.<\/p>\n\n<p>This will ask you to confirm if you want to add each hunk to the commit (a.k.a. the staging area) or not.<\/p>\n\n<p>For example, here's the prompt I get whilst working on the post for this email:<\/p>\n\n<pre><code class=\"shell\">diff --git a\/source\/_daily_emails\/2024-05-06.md b\/source\/_daily_emails\/2024-05-06.md\nindex 42fe48f..ef36a2b 100644\n--- a\/source\/_daily_emails\/2024-05-06.md\n+++ b\/source\/_daily_emails\/2024-05-06.md\n@@ -4,10 +4,12 @@ date: 2024-05-06\n permalink: daily\/2024\/05\/06\/interactive-staging\n tags:\n - software-development\n- # - drupal\n- # - php\n- # - podcast\n+ - git\n cta: ~\n snippet: |\n TODO\n ---\n+\n+A major addition to my Git workflow has been the ability to interactively add hunks of code to be committed.\n+\n+There's `git add -i` to interactively add, though I usually go straight to `git add -p` to use `patch`.\n+There's `git add -i` to interactively add, though I usually go straight to `git add -p` to use `patch`.\n(1\/1) Stage this hunk [y,n,q,a,d,s,e,?]?\n<\/code><\/pre>\n\n<p>I can add the whole hunk, split it into smaller hunks, add all the hunks in the file or ignore this hunk and later hunks in the file.<\/p>\n\n<p>Then the process is repeated for any following hunks.<\/p>\n\n<p>This means I can add the relevant hunks to craft the commit I want and I can keep my commits small and meaningful, and easy to revert if there is an issue.<\/p>\n\n ",