basics
except one file
top folder only
the parent trap
the fix
.gitignore (edit me)
A tiny model of Git's rules (the five above) checked against real Git on 21 rule sets. Folders are listed too, because a folder can be ignored on its own.