Go Back
Ignore but not .gitignore
Posted:
I had an instance where I wanted to ignore the WordPress plugin Query Monitor. But I didn't necessarily want to commit that to .gitignore. It's only my local environment I care about right now.
I found this blog post by Luis Dalmolin that helped me - https://luisdalmolin.dev/blog/ignoring-files-in-git-without-gitignore/#:~:text=To%20ignore%20untracked%20files%2C%20you,tracking%20any%20(untracked)%20file.
Summary
Essentially there is another location you can use to exclude files from git without using .gitignore.
.git/info/exclude
Seems to me it functions just like .gitignore
only it's not committed to git so it won't impact others working on the repo.
I'm not totally sure it's not a bad footgun, but that's why I'm writing this post.