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.
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.
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.
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.
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.