Hacker News new | ask | show | jobs
by MBlume 1428 days ago
"It is really hard to lose stuff"

It is really hard to lose stuff that you have ever committed. It is really hard to lose stuff as long as you commit early and often. Uncommitted work is pretty easy to lose with 'git reset'.

2 comments

Depends. I use an IDE from Jetbrains, their "Local History" feature makes it fairly difficult to lose anything, even between changes on uncommitted files.
I don’t think that counts as a “depends” if it involves the use of another tool.
This has saved me many times. Memory is cheap these days, this should probably be a more common editor feature, on by default.
... or with `git checkout` or with `rm` or `git clean` (for files not yet under version control).
... or git merge / git pull (but not git rebase) ...
How do you loose files with git merge / git pull?
merge and pull update the reflog just like rebase does, so both can be undone!