I wanted to publish a tiny utility I created to GitHub (you know, it might be useful to someone else...). Before that, I wanted to some cleanup, rebasing/squashing a bit, etc. In the middle of that:
$ git checkout featurebranch
The following untracked working tree files would be overwritten by checkout:
.gitignore
.idea/…
etc...
Oh, sure, no problem…
$ rm -rf * .*
$ git checkout featurebranch
fatal: not a git repository (or any of the parent directories): .git
D’oh! (Never mind, it probably wouldn't have been useful to anyone else, anyway.)