git add -p
Hacker ApprovedRanked 4 of 9 version control features by recommenders
Lets you stage parts of a file interactively, so commits hold only the changes you choose. Critics say it handles files with many unrelated changes poorly.
11 people recommended git add -p in Hacker News comments, 2 had mixed feelings and 4 criticized it, November 2025 to October 2026.
Summary written by Claude from 16 comments.
17 people gave an opinion
- recommend it
- 11
- mixed feelings
- 2
- warn against or regret it
- 4
The record
Recommended in 6 of 12 months
In 7 different threads.
- November 2025: not recommended
- December 2025: recommended
- January 2026: not recommended
- February 2026: recommended
- March 2026: not recommended
- April 2026: recommended
- May 2026: recommended
- June 2026: not recommended
- July 2026: recommended
- August 2026: recommended
- September 2026: not recommended
- October 2026: not recommended
Why it carries the badge
- 11 people recommend itNeeds 10 or more, met.
- 2.8 recommenders for every criticNeeds 2 to 1 or better, met.
- Recommended in 6 of 12 monthsNeeds 4 or more, met.
- Recommended in 7 threadsNeeds 5 or more, met.
- The biggest thread supplies 27% of its recommendersNeeds half or less, met.
The same rules apply to every product, and the badge can’t be bought. Mixed feelings count toward neither side. How the badge works
What people say about it
Reasons grouped from a sample of 16 of the 17 opinions about it, picked in proportion to how many people recommend it, have mixed feelings and criticize it. Each mark is one comment in the sample. Open a reason to read what they said.
Why people recommend it
Each mark is one comment
Stage selected hunks, skip the rest
“Ends up being a super quick way of staging a whole bunch of work and avoiding staging other”
Comment from 29 Jul 2026 in “Staging patches with Git add -p” “Being able to select only pieces of a file to add to a specific commit is so great.”
Comment from 26 Jul 2026 in “Git rebase -I is not that scary” Review changes before committing
“It's another moment to review my changes and it saves me from having to type out the names of the files I've changed.”
Comment from 14 Dec 2025 in “Using Git add -p for fun (and profit)” “Essentially, it's a first pass staging area you can review what you did. beautiful.”
Comment from 14 Dec 2025 in “Using Git add -p for fun (and profit)”
What people warn about
Each mark is one comment
Splitting hunks is tedious
“As anyone who's ever tried to split a days worth of work apart with `git add -p` is well aware.”
Comment from 5 Aug 2026 in “Zed DeltaDB” “I find splitting hunks a pain.”
Comment from 29 Jul 2026 in “Staging patches with Git add -p”
Other version control features people recommend
The four most recommended other version control features, with the same counts for each, so you can compare like for like. The tick on each bar marks the 2 to 1 line the badge needs.
| Product | Recommend | Mixed | Criticize | Approval | Months | Had for | Badge |
|---|---|---|---|---|---|---|---|
| Git worktree | 46 | 10 | 19 | 71% | 10 | — | Approved |
| git rebase | 21 | 2 | 11 | 66% | 8 | — | — |
| git rerere | 16 | 2 | 4 | 80% | 7 | — | Approved |
| git add -pThis page | 11 | 2 | 4 | 73% | 6 | — | Approved |
| Git notes | 10 | 1 | 2 | 83% | 7 | — | Approved |
Also compared with Git submodules.
What people said
16 of the 17 opinions about it, picked in proportion to the three counts, newest first. Each links to the original comment.
“it's patch functionality isn't as robust as `git add --patch”
“As anyone who's ever tried to split a days worth of work apart with `git add -p` is well aware.”
“I think that it promotes committing untested code.”
“try J and K instead of j and k; that moves to next/previous hunk, not next/previous unreviewed hunk.”
“My biggest problem with `add -p` is correcting any patches I added or rejected by accident.”
“Ends up being a super quick way of staging a whole bunch of work and avoiding staging other”
“Use 'e' in -p mode and you can edit the hunks as you wish, choose lines, etc.”
“I find splitting hunks a pain.”
“Being able to select only pieces of a file to add to a specific commit is so great.”
“There are cases it doesn’t handle well, like if you want something at the bottom of a file with lots of irrelevant changes.”
“sounds like a useful tool to try”
“It really should be the default”
“the / (search) command to search unstaged hunks for a specific keyword rather than having to jump through all the individual changes”
“It's another moment to review my changes and it saves me from having to type out the names of the files I've changed.”
“Essentially, it's a first pass staging area you can review what you did. beautiful.”
“A disadvantage of git add -p is that it allows you to create a commit that never existed on the development system”
Counts come from 1,791,911 Hacker News comments labeled by Claude, November 2025 to October 2026, with data through October 31, 2026. Counts updated 2 Nov 2026. How we count. Report a mistake.