The only reason people lose code is because
1. they didn't read this one diagram: https://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-...
2. And then they run `reset --hard`
1. they didn't read this one diagram: https://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-...
2. And then they run `reset --hard`
On the other hand. `git checkout .` with unstaged changes tends to be the most common way I've seen people lose code via git.
I feel like all of this would be resolved if my boy Linus had renamed `git add` to `git stage` or `git prepare` or something more clear.
Or added some warning, like "all this stuff you haven't committed yet; it's not managed by `git` so don't try to overwrite it all using `git` until you've committed some of it."