TIL: Ignoring Files Without Changing .gitignore

March 22, 2025 • TIL, git

Sometimes I need a way to ignore files (such as temporary or scratch files) without affecting the repository’s shared .gitignore. I just learned that git offers a solution for this: the local exclude file.

By editing the .git/info/exclude, you create ignore rules that apply only to your local repository. Awesome!

Thanks to my colleague Margarida for sharing this tip with me! 🙌


Recent posts