问题
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