*Updated 29th october 2012*
Here are the settings i use for my .gitignore in a symfony project.
## generic files to ignore *~ *.lock *.DS_Store *.swp *.out
IDE files are personal and not interesting for other people:
## IDE files to ignore nbproject/ .idea/ *.tmproj
Symfony specific ignore files:
# Symfony files to ignore app/config/parameters.ini web/bundles/ app/bootstrap.php.cache app/cache/* app/logs/* build/ vendor composer.phar
Everything is pretty simple but the Symfony ignore part perhaps needs some explanation. The obvious is the cache and the log directories, no need to store them.
The vendor dir is downloaded with the
and it also install the files in web/bundles. IMPORTANT This is only true if you add new bundles to it through the deps file and not with git directly they will be downloaded. For an example of how to add a bundle to the deps file have a look here.
The most important file to ignore is the app/config/parameters.ini it contains your database settings and should not be shared with git.