Every two weeks I send out a newsletter containing lots of interesting stuff for the modern PHP developer. You can expect quick tips, links to interesting tutorials, opinions and packages. Want to learn the cool stuff? Then sign up now!

Create a global .gitignore

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.

Freek Van der Herten is a partner and developer at Spatie, an Antwerp based company that specializes in creating web apps with Laravel. After hours he writes about modern PHP and Laravel on this blog. When not coding he’s probably rehearsing with his kraut rock band.