.git/info/exclude
A private ignore file inside .git that works like .gitignore but is never committed, for clutter only you create.
In more detail
Its lines use the same pattern language as .gitignore. Because it lives in .git, it affects only your clone; the rest of the team never sees it. The info directory it sits in also holds a few other rarely touched files.
Example
printf 'scratch.txt\n' >> .git/info/excludeRelated terms
- .gitignore — A text file of patterns naming untracked files Git should not report or add, such as build output and logs.
- core.excludesFile — The setting naming a personal ignore file that applies to every repository on your machine.
- .git directory — The hidden directory at the root of a repository where Git keeps all of its data: objects, refs, HEAD, config and the index.
Taught in
- A Repository Is A Folder With A Memory — Advanced Git Internals & Distributed Workflows
- Ignoring Files, And The Tracked File Trap — Advanced Git Internals & Distributed Workflows
- What A Remote Actually Is — Advanced Git Internals & Distributed Workflows