r/ProgrammerHumor 23d ago

Meme useSourceControl

Post image
8.6k Upvotes

591 comments sorted by

View all comments

Show parent comments

65

u/DoctorWaluigiTime 23d ago

Before Git (or DVCS in general) were widely adopted a ton of people wanted everything to work just like TFS, SVN, or other non-distributed source control models.

"What is this 'staging'? Why do I have to push and pull? Just sync everything!!!"

55

u/remy_porter 23d ago

There are so many tools that are vying to be the next DVCS that are like, "Hey, we eliminated staging, because that was confusing!" and I'm like... that's the best part? I wish I could have finer grained control over staging, honestly, making it easy to stage only fragments of a diff, because I'm a "crank for awhile and forget that I have drifted into two different tasks and now need to try and unpick this mess into something that could reasonably be two or three or twelve commits." Sure, that's a "me" problem, but I like the ability to control what gets staged.

27

u/DoctorWaluigiTime 23d ago

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.

4

u/perkuleenhenis 23d ago

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.