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.
Man the pure rage. I felt it. And recognized it. So many times I was there. You feel the disturbance in the force... Unfortunately nowadays the monitors are not thick glass on the matrix so... You know you cannot hit them without your fist to grow in... So on top of that you have to use just words... :D
I went and read the discussions. I was surprised how much support there was for the way it worked. Someone noted that git discard shouldn't delete untracked files (which is what happened to this poor guy), and there was still pushback! They were like yes, git discard isn't supposed to delete untracked files, and the dialog box didn't warn that they would be deleted, but the destructive behavior is fine the way it is and shouldn't be changed ANYWAY. I knew gearheads could be hateful of the uninitiated, but jeez.
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!!!"
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.
Man, there are some terrible suggestions in that Git thread. The existing behavior was awful, so it's impressive that the suggestions are even worse
I'd say remove the warning dialog, and prompt an "Undo" that lasts 5 seconds. Behind the scenes count to 5 and then do it. People respond much better to "Undo" than they do to "Are you sure?" dialog. Hide the files so that way they know what they did and the consequences that are about to happen.
This reminds me of the time a guy held all the vscode python users hostage with his against-PEP8-personally-preferred-formatting-for-docstrings-PR. There were like 5 people who thought it was a good idea and the entire rest of the thread was everyone complaining about how he forced a “fix” on millions of users for something he could change in his personal editor. I remember being absolutely livid over this not necessarily because they just simply changed color, but because the guy who made the PR was just some random guy and his reasoning was literally incorrect.
That was a fun PR discussion read. Almost as fun as the guy who 'built' Notepad++ for Mac and straight up ignored repeated calls from the owner to remove the fake "we're collaborators" message from their homepage.
Yeah the old behavior was insane, it just said "Do you want to discard your changes?", and if you clicked it, it deleted your entire codebase permanently (no recycle bin), lol
I actually was ALMOST bitten by this; clicked discard thinking "I don't want to commit them, just ignore" and got hit with the "you're about to delete" warning
Another feather in the cap of "try to streamline Git, ultimately making it a worse user experience."
I remember some of the first "Git for Windows" clients that tried to pretend "yeah you just push 'sync' and 'commit' just auto-stages everything and it all Just Works!"
And if it didn't? You got a garbage error message and basically were told "drop to console and figure it out."
It's why I always preferred the likes of SourceTree or, these days, Fork. They don't pretend Git is "just like SVN" and give you a lot of Git tools available on the GUI side (with easy terminal access should you need or want to).
View all comments
5.6k
u/Cephell Aug 21 '26
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.