Post

Everyone: No, GitHub Desktop is better! No, VS Code! Me: ...I just use `git add -p`. Walks you through each change, hunk for hunk, and lets you accept with `y`. It’s like a mini code review before you commit. Pair that with dandavison/delta, and you get syntax highlighting too 👀

13 reposts115 likes

I don't typically use the patch approach (as it feels that I'm not testing what's getting committed fully), but my go to is the doing a git diff and then stage that file, repeat. Blows my mind seeing obviously blindly committed code in a pr.

I'm a serial "git add -p" user. (Micro-review before every commit is super healthy imo). I made an alias a while ago I use frequently, which let's you choose (via fzf) the file you care about first. af => !f() { git add -p $(git diff --name-only | fzf); }; f