this post was submitted on 25 Mar 2025
6 points (100.0% liked)

PhpStorm

80 readers
1 users here now

A community for the PhpStorm IDE for PHP developers! https://www.jetbrains.com/phpstorm/

Copyright © 2024 JetBrains s.r.o. PHPStorm and the PHPStorm logo are registered trademarks of JetBrains s.r.o.

founded 1 year ago
MODERATORS
 

@phpstorm "Local History" saves my *ss for a second time after I "reset hard" my git repo in the wrong folder containing quite some uncommitted code.

you are viewing a single comment's thread
view the rest of the comments
[–] Kissaki 1 points 5 days ago (1 children)

How would you discard all/numerous changes without a hard reset?

[–] FizzyOrange 1 points 5 days ago

I normally click the "discard all changes" button in VSCode and it asks me if I am sure. That confirmation dialog has saved me a few times!

From the command line I'd normally git checkout . and git clean -ffxd. I guess you could say it's no different to git reset --head HEAD in a sense...