Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

where should I put .gitignore to affect all projects?

Tags:

git

egit

where should I place a .gitignore file so that all my projects use those settings?

I tried various folders and I can only get it to work if I put it in my project folder, but then the settings (of course) only are applied to that project... not my other projects.

like image 516
ycomp Avatar asked Dec 01 '22 00:12

ycomp


1 Answers

git include a "global" configuration option which can tell it to include the files you want to ignore always when you start a project. Example, if the compilation of your ignore files is called: ignore_global, you could do this;

git config --global core.excludesfile /path/to/your/ignore_global

more about it at here: Ignore Files

like image 152
Maverick Avatar answered Dec 04 '22 00:12

Maverick