4 ms·
I agree. If losing code with Git is even a remote possibility, then you're "holding it wrong" indeed.
by copperx 4y ago
I agree. If losing code with Git is even a remote possibility, then you're "holding it wrong" indeed.
- Dylan16807 4y agoThere are multiple ways to accidentally overwrite or delete a file that wasn't committed yet. There are also situations where you need to use these commands and you're not ready to commit everything. The safe way to handle this is generally making a stash commit and immediately applying it, but if you don't know that, or don't think to do that first, the result can be data loss. Git is very careful about commits but if you never staged something then git can be ruthless.