How to create a global .gitignore file

Rules for ignoring files in all Git repositories on your computer.

Lets say for example you and your colleagues use different IDE's for development. 

You use PHPStorm and your colleague uses Netbeans. You want to avoid having project settings for these IDE's in your GIT repository.

This is where setting up a global .gitignore file on your computer comes in handy.

On a mac you would open your terminal and execute the following:

vi ~/.gitignore

and then insert the desired files to the .gitignore file you are about to create/edit.


#Netbeans related

#PHPStorm related

Now all we have to do is tell git where our global gitignore file lives:

git config --global core.excludesfile '~/.gitignore'

Et voilà! You now have a global .gitignore file that you can keep on tweaking.


Meer leesvoer

I have been working on a Drupal 8 multisite and at some point I had to set up a new site in the structure. The...
In this blog post you will learn how to add a theme field preprocess function in your theme.
In this blog post I show you how to login and logout from a Drupal 8 Back-end from an Ionic app
It's quite easy to create a node with REST in Drupal 8, in this blog post I'll show you how to do it.