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.
"I’ve been reading freeks newsletter for a while now, and it’s easily one of my favorite developer newsletters. Freek shares practical, no-nonsense insights from running Spatie, maintaining hundreds of open-source packages, and shipping real products.
Every time I get useful Laravel tips, smart tooling advice, always high quality and immediately applicable."