I'd like to emphasize the `.git/info/exclude`, which is a "repo-local gitignore", i.e. only for you and only for this repo.

Useful when you want to create a temporary file to help you e.g. with a bug investigation, and make sure it stays untouched while you switch branches, and to avoid accidentally committing it.

I have a shell alias like this:

    git-ignore-local () {
      echo "$1" >> .git/info/exclude
    }
and use it like `git-ignore-local myfile.ext`

.git/info/exclude is mentioned in the first section (about .gitignore)

Oops, I've glanced over it too fast. Thanks - updated my post.