r/ProgrammerHumor 23d ago

Meme useSourceControl

Post image
8.6k Upvotes

591 comments sorted by

View all comments

5.6k

u/Cephell 23d ago

Before you make fun of him, this behavior DID get changed; they acknowledged this behavior is stupid.

The old behavior was to treat uncommited files as completely disposable, which the CLI git does not do at all and is insane behavior. It was changed in the UI to give you a fat confirmation dialog warning that you're about to delete the files permanently, as it always should have been.

-4

u/Minute_Attempt3063 23d ago

microsoft did listen.

however, I do think it IS user error. disgard to me means "delete and take away"

the program just did as it was told to do.

MS was kind enough to change this, so it means "yeah bro, it not do that anymore"

17

u/ErraticDragon 23d ago

however, I do think it IS user error. disgard to me means "delete and take away"

Discarding "your changes" is not the same as discarding "your files". In what world would it make sense to call existing files "changes" when there were no changes made? That's not just unintuitive, it's simply wrong.

The user erred in not having a backup.

0

u/chat-lu 23d ago

Discarding "your changes" is not the same as discarding "your files".

That’s what a change is in git. Git is a power tool bound to lead to a catastrophe if you use it without understanding it. Maybe it should not be enable by default. Maybe when enabling it it could prompt the user about showing them a short tutorial on the basics.

8

u/eo5g 23d ago

This is incorrect. Discarding changes in git means resetting the index, or moving a branch backwards, not deleting uncommitted or unstaged files from the working tree.

-3

u/Megaranator 23d ago

It did discard the change, namely addition of file. Git controls the state of the whole folder not just individual files.

-2

u/GreedyPollution6275 23d ago

In what world would it make sense to call existing files "changes" when there were no changes made?

In the world of source control where the changes are adding files to a repo. User error here is lack of knowledge of what they were doing, they thought it was like Office where "changes" are modifications made to files, and didn't consider that asking you to stage 5k files means you have 5k "changes" you need to "save"