"value":"\n <p><a href=\"https:\/\/www.oliverdavies.uk\/daily\/2024\/10\/24\/git-stash-is-underrated\">In yesterday's email<\/a> where I wrote about <code>git stash<\/code>, I mentioned the <code>-p<\/code> or <code>--patch<\/code> options.<\/p>\n\n<p>When stashing changes, this allows you to interactively select which changes you want to stash and what you don't.<\/p>\n\n<p>This is supported by other Git commands, including <code>git add<\/code>.<\/p>\n\n<p>I always use <code>git add -p<\/code> when adding changes as it gives me the chance to review them before committing them.<\/p>\n\n<p>If I left any stray comments, debug code, trailing spaces or anything I don't want to commit, I can remove them.<\/p>\n\n<p>If I was working on multiple changes (which I avoid), I can select the appropriate changes and create commits related to each change to keep the history clean and useful.<\/p>\n\n<p>I also use <code>git diff<\/code> and <code>git diff --staged<\/code> to review changes as well as <code>git show<\/code> to review commits.<\/p>\n\n<p>By doing this, I know my commits will be in the best state for others to review now or for me to review if I need to in the future.<\/p>\n\n ",
"format":"full_html",
"processed":"\n <p><a href=\"https:\/\/www.oliverdavies.uk\/daily\/2024\/10\/24\/git-stash-is-underrated\">In yesterday's email<\/a> where I wrote about <code>git stash<\/code>, I mentioned the <code>-p<\/code> or <code>--patch<\/code> options.<\/p>\n\n<p>When stashing changes, this allows you to interactively select which changes you want to stash and what you don't.<\/p>\n\n<p>This is supported by other Git commands, including <code>git add<\/code>.<\/p>\n\n<p>I always use <code>git add -p<\/code> when adding changes as it gives me the chance to review them before committing them.<\/p>\n\n<p>If I left any stray comments, debug code, trailing spaces or anything I don't want to commit, I can remove them.<\/p>\n\n<p>If I was working on multiple changes (which I avoid), I can select the appropriate changes and create commits related to each change to keep the history clean and useful.<\/p>\n\n<p>I also use <code>git diff<\/code> and <code>git diff --staged<\/code> to review changes as well as <code>git show<\/code> to review commits.<\/p>\n\n<p>By doing this, I know my commits will be in the best state for others to review now or for me to review if I need to in the future.<\/p>\n\n ",