Well here it is, my typical .gitignore file for every project. This doesn’t change much. Specially it is written for Yii Framework and CakePHP:

#Linux
*~
*.sw[a-p]
.directory

#Revisioning systems
/.svn/*
/.svn/
/CVS/*
/CVS/
.cvsignore
*/.cvsignore

#Mac OS X
.DS_Store
Icon?
._*
.Spotlight-V100
.Trashes

#Windows
Thumbs.db
Desktop.ini

#PHP
php_errors.log

#IDEs, compiled languages etc.
.redcar
nbproject/
*.pydevproject
.project
.metadata
bin/**
tmp/**
tmp/**/*
*.tmp
*.bak
*.swp
*~.nib
local.properties
.classpath
.settings/
.loadpath
.cproject
*.iml
*.ipr
*.iws
.idea/

#CakePHP
tmp/*
config/database.php
app/tmp/*
app/config/database.php
!empty

#Code Igniter
/config/database.php
*/system/logs/log-.php
/system/cache/
*/system/cache/!index.html

#Yii Framework
protected/config/main-local.php

/.htaccess

Additionally in the directories ./protected/runtime and ./assets I also added a .gitignore file containing the following:

*
!.gitignore

This allows both folders to be committed into my Git repository despite them being empty. Think of it as CakePHP’s !empty. Both directories will be populated during application run time.

comments powered by Disqus