git add -p

Category: Git - Core

git add -p

Interactively select hunks of changes to stage

Lets you interactively choose which parts (hunks) of changed files to stage. -p means 'patch mode'.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.