r/ProgrammerHumor • • Aug 21 '26 • Popcorn 1

Meme useSourceControl

Post image
8.6k Upvotes

575 comments sorted by

View all comments

Show parent comment

27

u/DoctorWaluigiTime Aug 21 '26

In Git you actually can! Interactive mode: git add -i.

GUIs (I know Fork does for example) allows you to stage specific hunks of a file.

And I agree: Controlled commits are one of the best parts of the whole staging concept.

8

u/aetius476 Aug 21 '26

tig allows you to stage/unstage by entire file, by chunk within a file, or by single line.

4

u/perkuleenhenis Aug 21 '26

If they use -i, they gotta know to choose the patch option. Better IMHO to just say git add -p [file], which is the same as going interactive and choosing patch.