Setting up a global .gitignore on a Mac
I work with multiple OSes, programming languages and frameworks so here is a tip on keeping your git repos clean. I create a global .gitignore file to exclude platform related files (OS and IDE) and then when I create a new project I create a project specific .gitignore for the project related files which is specific to the languages and frameworks I am using in the project.
You may name the file and place it where you want. I typically just name it .gitignore and store at '~/.gitignore'.
Set it by running the following in a terminal:
Here is my global which I place at '~/.gitignore'
GitHub have created a repo as a guide for what to include in your .gitignore for specific languages and frameworks: https://github.com/github/gitignore.
Creating a global gitignore on a Mac
You may name the file and place it where you want. I typically just name it .gitignore and store at '~/.gitignore'.
Set it by running the following in a terminal:
git config --global core.excludesfile '~/.gitignore'
Example global gitignore
Here is my global which I place at '~/.gitignore'
Project specific gitignore
GitHub have created a repo as a guide for what to include in your .gitignore for specific languages and frameworks: https://github.com/github/gitignore.
Comments