Best way to avoid committing certain files

I am working on a public open source project, to which I commit several times a day.

I have certain extensions in my VS Code, that the owner of the project doesn’t have, but those extensions create files. I don’t want to commit those files, but at the same time, I don’t want to add things to .gitignore and commit a new version of it, because they have nothing to do with the project as a whole.

What would be the best practice to avoid committing such files, without .gitignore and still eliminating human error ?

You can use the .git/info/exclude file. It works just like .gitignore, but limited to the current local repository.

2 Likes

Thank you, exactly what I needed! :slight_smile:

1 Like