.gitignore files are intended to be committed as part of the repository.
If you want to ignore certain files without committing the ignore rules, here are some options:
Edit the .git/info/exclude file (using the same syntax as .gitignore).
The rules will be global in the scope of the repository;
Set up a global gitignore file that will apply ignore rules to all your local repositories:
.gitignore files are intended to be committed as part of the repository.
If you want to ignore certain files without committing the ignore rules, here are some options:
Edit the .git/info/exclude file (using the same syntax as .gitignore).
The rules will be global in the scope of the repository;
Set up a global gitignore file that will apply ignore rules to all your local repositories: