3 ms·
Apparently we both need to write better, because you missed the point of my example. Most—if not all—local changes that would be destroyed by git reset --hard s
by slavik81 11y ago
Apparently we both need to write better, because you missed the point of my example. Most—if not all—local changes that would be destroyed by git reset --hard show up in git status.
git clean -dfx will wipe out ignored files, which do not show up in git status, so it's much easier to forget about something you meant to keep.
- hvis 11y agoI've never used 'git clean -dfx' routinely during development. On the other hand, I've seen a colleague lose a few hours' work by forgetting to commit a specific file out of a set, and then doing 'git reset --hard' for some reason. 'git status' didn't save him. Luckily, he did commit the corresponding tests file.