Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That does sound like a bad UI though. Perhaps vscode could stage the files before, so that they end up in Git's objects at least? Or somehow store them in the reflog


If I'm reading the situation correctly, Git was also involved in the problem.

This person seemed to have his project under Git version control... but he hadn't committed for 3 months, which implies he viewed Git as an inconvenience at best. Perhaps the company is just passing around some project scaffolding?

Any other GUI over your version control software is going to have the option to discard recent changes. Discarding changes sounds like a potentially damaging thing, so it makes sense that you'd want to gate it with a warning dialogue. But they did gate it, and if files are deleted in the process, they do say DELETED in caps, and then they gate you again with another popup by saying IRREVERSIBLE in caps.

Adding a third popup gate would be excessive.


> but he hadn't committed for 3 months

I get nervous when I haven't commited for 2-3 days. Since I don't want to commit broken code, I make a patch and send it somewhere for peace of mind. In addition to that I have an editor add-on that saves a copy every single time I save a file. One time it allowed me to recover the work of several days.

You don't need backups until you do. Some people learn the hard way.


> I get nervous when I haven't commited for 2-3 days.

I get nervous when I haven't commited for 2-3 hours. I can't even begin to comprehend how someone could make 5000+ file changes to a git repo for 2-3 months and not commit once. He probably didn't know about version control, and was working on someone else's project?


My changes tend to be small, slow but profound. I think a lot on most problems I solve. In other areas of development it would probably be 6-8 hours. I get nervous because the hard disk can break at any moment, but it's unlikely enough that repeating 6-8 hours worth of work every 2-3 years is an acceptable risk to me.


Git stash is a great tool to keep unfinished work, IMO. You _stash_ your changes if you need to work on something else, and then you pop it from the stash to continue working on it. No commits, no branches. Just stash and pop.


I use stash all the time. That's not the problem. The worry is losing the whole repo because of hard disk failure.


I use an AWS instance for development (on Windows, I suppose that Linux could also have a similar setup).

This setup allows me to use AWS snapshots to have the disk backed up (crash consistently) once a day (but it could be once an hour or even less). I shut down the AWS instance when I do not use it because it starts up again in seconds when I need it.

When I do not have a fiber connection at hand, I can use my 4G phone as a personal hotspot with 60-80ms latency to AWS Ireland from my country, which gives a great experience with RDP, has been a game changer when in the move.

Since RDP traffic is about only 10MB/hour, even if you work 160 hours a month using the 4G phone you are at 1.6GB/month, which costs about EUR 7/month.

I happen to use various Macs as client machines, but their role is mostly a thin client with occasional web browsing.

This VDI approach allows the Mac specs to be quite low (one of my Macs was bought in 2009). In any case, if I ever need to upgrade because of software becaming heavier, I just need to change the AWS instance type.


> I have an editor add-on that saves a copy every single time I save a file

This sounds very useful! Is this addon for vscode? Please educate me :-)


It's an atom addon called local-history. It seems there's a VS code addon of the same name with the same functionality.


This sounds very wasteful unless it is doing diffs in the background. In which case, git would be better.


It doesn't do diffs and it's no replacement for git, but complements it as one added layer of protection. It's kind of wasteful but my local-history is 100 mb big after some months. And you can tell it to auto purge anything older than X days. I would put 90 days as default instead of 30.


It's pretty bad UI design, but pressing the discard button does open a confirmation box that says "Are you sure you want to discard ALL changes? This is IRREVERSIBLE!"

With that kind of a message, it's amazing how he didn't think twice about discarding them. Especially when he didn't have a proper source control before.


3 months of code work and no version control...

You have to wonder if he actually learnt a valuable lesson or just ran away blaming Microsoft...


I'm not hopeful:

> I don't need to explain why I don't have a private repo with my stuff. It is the software's concern NOT to destroy the integrity of a computer like a damn virus. You come here, see my despair and berate me for something that was not my fault, and has happened to a lot of other people? Fuck you.


While I think he should have learn his lesson before, also I think it should show the list of files it would delete.


He most likely didn't have a proper source control because he didn't even know what it is. For someone like him your proposed warning wouldn't be effective, because according to his belief he didn't change anything yet.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: