4 ms·
I was surprised to learn a few months ago from https://news.ycombinator.com/item?id=28958613 https://news.ycombinator.com/item?id=28958613 that the "git reset -
by schoen 4y ago
I was surprised to learn a few months ago from https://news.ycombinator.com/item?id=28958613 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!
- pca006132 4y agoYou 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.
- wruza 4y agoI 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.
- npteljes 4y agoExactly. To me, some branches are quality, some are quantity.
- ithkuil 4y agoYou can also stash them which is effectively a commit into a special stash stack
- deleted 4y ago[deleted]