DEV Community

Toolloom
Toolloom

Posted on • Originally published at toolloom.com on

Master the Partial Commit

Ever find yourself halfway through a feature only to realize you've fixed three unrelated bugs in the same file? Instead of committing everything at once and creating a messy history, try using "git add -p". This command puts you into an interactive mode where you can review each "hunk" of change and decide whether to stage it, skip it, or even manually edit the patch. It’s a lifesaver for keeping your pull requests clean, focused, and easy to review.

Top comments (0)