Having a global ~/.gitignore file (i.e. in your home directory) is a great way to allow writing notes and scratch code in any repo without having it accidentally committed.
Just a simple entry like “scratch.*” will allow you to write scratch.md files for notes, scratch.go for code, scratch.rego for policy, and so on. Super useful!