3 ms·
There’s basically never an irrecoverable state in git, and it’s rare that you can’t recover “lost” data from the reflog. Yes it does require expertise to recove
by fanf2 6y ago
There’s basically never an irrecoverable state in git, and it’s rare that you can’t recover “lost” data from the reflog. Yes it does require expertise to recover from a cockup, but you will never gain the expertise if you treat it as impossible.
Note that you don’t have to avoid getting in a mess: it’s normal, when you are trying to do something unusual or advanced (or impossible in other version control systems) to make a mistake and accidentally blow your foot off, but git gives you the tools to glue your foot back on good as new.
- dwheeler 6y ago> There’s basically never an irrecoverable state in git That is technically correct but irrelevant. If a user doesn't know how to easily recover, then there's a problem. There should probably be a "git undo" command that always undoes whatever was done last. There's usually a way to undo a command (e.g., using the reflog), but the problem is that you have to know the correct incantation for every circumstance: https://github.blog/2015-06-08-how-to-undo-almost-anything-with-git/ https://github.blog/2015-06-08-how-to-undo-almost-anything-w...