The best way to put your ignored files (that come from one project to another)  to global git ignore config see: http://devoh.com/blog/2013/01/global-gitignore or google `git global ignore`

this my global ignore file for example:
```
> cat ~/.gitcfg/.gitignore 
#### NetBeans ####
nbproject/
nbactions.xml

#### Phpstorm ####

.idea


#### Mac OS X ####

.DS_Store
Icon?

# Thumbnails
._*

# Files that might appear on external disk
.Spotlight-V100
.Trashes


#### Linux ####

.*
!.gitignore
*~

# KDE
.directory


#### Win ####

# Image file caches
Thumbs.db

# Folder config file
Desktop.ini

#### Composer ####

composer.lock
composer.phar

#### Vendors ####
vendor/

Tests/autoload.php
Tests/phpunit.xml

phpunit.xml
```