Symfony3和.gitignore [英] Symfony3 and .gitignore

查看:67
本文介绍了Symfony3和.gitignore的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚尝试从github克隆一个Symfony3项目,并意识到它不包含/bin/(因为Symfony2中不需要).

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

我现在已经更新了我的 .gitignore 以删除/bin//build/目录,以避免将来发生这种情况.我还缺少对标准的Symfony3 .gitignore 文件进行的其他修改吗?

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?

我当前的内容如下:

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

已删除的条目:

/bin/
/build/

推荐答案

这是我在一个项目中使用过的文件,从该文件中我拉入了不同的计算机,直到现在为止都没有问题,只需拉出和作曲家的命令等即可.希望它可以帮助[我知道这不是完美的,欢迎提出任何改进建议]

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<br>
/build/<br>
/phpunit.xml<br>
/var/*<br>
!/var/cache<br>
/var/cache/*<br>
!var/cache/.gitkeep<br>
!/var/logs<br>
/var/logs/*<br>
!var/logs/.gitkeep<br>
!/var/sessions<br>
/var/sessions/*<br>
!var/sessions/.gitkeep<br>
!var/SymfonyRequirements.php<br>
/vendor/<br>
/web/bundles/<br>

这篇关于Symfony3和.gitignore的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆