News for hackers. Stuff that matters.
Re:Shellfirm: Intercept risky patterns at the command line by schoen on Sunday July 31, 2022 @03:57AM (#32294056)
I was surprised to learn a few months ago from https://news.ycombinator.com/item?id=28958613 that the "git reset --hard" does not actually delete the files and you can still recover references to them using "git reflog".

I'm pretty sure most git users (who know what "git reset" is) don't realize this!

Re:Shellfirm: Intercept risky patterns at the command line by pca006132 on Sunday July 31, 2022 @04:00AM (#32294081)
You need to commit them first. If you did not commit them, it doesn't work. But yeah, maybe I can just define an alias to add+commit+reset, which should solve this problem.
Re:Shellfirm: Intercept risky patterns at the command line by wruza on Sunday July 31, 2022 @04:44AM (#32294265)
I just stopped worrying and commit everything into my own repos, even half baked or temporary, making sure that a commit message or a file name signals it clearly. It’s a versioning system for this exact purpose, not a ceremonial sanctuary.
Re:Shellfirm: Intercept risky patterns at the command line by npteljes on Sunday July 31, 2022 @08:44AM (#32295141)
Exactly. To me, some branches are quality, some are quantity.
Re:Shellfirm: Intercept risky patterns at the command line by ithkuil on Sunday July 31, 2022 @08:55AM (#32295196)
You can also stash them which is effectively a commit into a special stash stack