git——Symfony2框架被忽略文件.gitignore的参考配置

在使用git时我们会遇到有些文件不需要提交的,我们就可以将其忽略掉,打开.gitignore文件,将下面代码写入保存即可。

# Cache and logs (Symfony2)
/app/cache/*
/app/logs/*
!app/cache/.gitkeep
!app/logs/.gitkeep
  
# Cache and logs (Symfony3)
/var/cache/*
/var/logs/*
!var/cache/.gitkeep
!var/logs/.gitkeep
  
# Parameters
/app/config/parameters.yml
/app/config/parameters.ini
  
# Managed by Composer
/app/bootstrap.php.cache
/var/bootstrap.php.cache
/bin/*
!bin/console
!bin/symfony_requirements
/vendor/
  
# Assets and user uploads
/web/bundles/
/web/uploads/
  
# PHPUnit
/app/phpunit.xml
/phpunit.xml
  
# Build data
/build/
  
# Composer PHAR
/composer.phar

其他框架的忽略文件参考:

https://github.com/github/gitignore

by 雪洁 2014-08-22 05:47:19 2671 views

1 Comments

allen 2014-09-10 19:02:42
博主真是牛逼啊,程序媛
我来说几句

相关文章