I have a repository with a .gitignore file, which excludes build paths (eg. vendor/
from Composer).
I also have some local IDE paths (eg. .idea
from PhpStorm) that I want to ignore, but that aren't in the repository's .gitignore file.
I'm not sure how to do this. If git looked for files like .gitignore_*
in the folder, then I could just add a .gitignore_local
that contains (among other things) its own name.
For local ignores, you can add them to the .git/info/exclude
file. This is not shared to remote repositories.
So add to .gitignore
all the files that should be ignored by anyone working with the repository. Add to .git/info/exclude
files you use personnally but other people have no reason to have them, therefore to ignore them.
You can add a second .gitignore file with a single asterisk in the .idea
directory. Thus all files in this directory are ignored and the directory itself is not shown as untracked file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With