Back to all tips

Git Pro Tips

Partial Staging

🗓️ Published: 4/15/2026 Originally on X: 7/7/2022
Partial Staging

To stage only part of a file, use interactive add:

git add -i

Then type p for patch, choose the file, and pick the changes you want to stage.

Discuss this tip on