Symfony3 and .gitignore

情到浓时终转凉″ 提交于 2021-02-10 12:18:25

问题


I've just tried cloning a Symfony3 project from github and realised it doesn't include /bin/ (as this was not required in Symfony2).

I have now updated my .gitignore to take out the /bin/ and /build/ directories to avoid this happening in future. Are there any other modifications that I'm missing that we should be making to a 'standard' Symfony3 .gitignore file?

My current content is as follows now:

/app/config/parameters.yml
/composer.phar
/vendor/
/web/bundles/
/var/
!var/cache/.gitkeep
!var/logs/.gitkeep
!var/sessions/.gitkeep
/phpunit.xml

Removed entries:

/bin/
/build/

回答1:


this is a file that i used in a project from which i pulled in differents computers and untill now no problems, just pull and composer commands etc. Hope it helps [i know is not perfect, any improves suggested are welcome]

/app/config/parameters.yml
/build/
/phpunit.xml
/var/
!/var/cache
/var/cache/

!var/cache/.gitkeep
!/var/logs
/var/logs/
!var/logs/.gitkeep
!/var/sessions
/var/sessions/

!var/sessions/.gitkeep
!var/SymfonyRequirements.php
/vendor/
/web/bundles/



来源:https://stackoverflow.com/questions/34705418/symfony3-and-gitignore

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!