Probably you're using a .gitignore file for every project. If you find yourself creating a .gitignore file for the same files on every project you should use a global .gitignore file.
You can specify the location of the global .gitignore file with this command:
git config --global core.excludesfile '~/.gitignore'
If you're on osx you can add files such as .DS_STORE, Thumbs.db, ... PhpStorm-users could add .idea.
My global .gitignore file can be viewed on github.
Get my monthly newsletter with what I learn from running Spatie, building Oh Dear, and maintaining 300+ open source packages. Practical takes on Laravel, PHP, and AI that you can actually use.
No spam. Unsubscribe anytime.
You can also follow me on X.
"Freek’s newsletter is one of the best ways to stay updated with the Laravel and PHP ecosystem. It consistently highlights useful packages, tools, and ideas from the community, especially the amazing work coming from Spatie. As a Laravel developer building SaaS and web platforms, I find it extremely helpful to discover practical tools and insights that improve my development workflow."