2012-06-03 57 views
2

我试图在没有供应商预装的情况下安装新的Symfony项目。我运行Windows,我已经使用来自Symfony的食谱以下指南:Symfony bin /供应商本地修改

How to Create and store a Symfony2 Project in git

我是相当新的都Git和Symfony的。当我运行的bin /厂商剧本我终于碰上这样的:

Installing/Updating monolog 
M src/Monolog/Handler/FingersCrossed/ActivationStrategyInterface.php 
M src/Monolog/Handler/FingersCrossed/ErrorLevelActivationStrategy.php 
"monolog" has local modifications. Please revert or commit/push them before running this command again. 

我运行2.0.15。我已经尝试过(利用我对Git,cmd和Symfony的有限知识)来解决这个问题,使用本指南Dealing with line endings并最终这Charles Baily's answer to 'Trying to fix line-endings with git filter-branch, but having no luck'

虽然我不认为自己做得对。我逃离我的CMD下面几行:

git config --global core.autocrlf true 
#Nothing appears, just a new line 

git rm --cached -r . 
#Alot of files appear 

git reset --hard 
#HEAD is now at xxxxx initial commit 

git add . 
#According to the first link and Charles Baily's answer there should appear alot of files, but none do. 

git commit -m "message" 
#Nothing to commit 

没有任何人有任何线索什么,我做错了,如何解决这一问题?

+0

'cd' into * vendor/monolog *并执行'git reset --hard master'。那样有用吗? –

+0

我的意思是'origin/master'。 –

+0

这没有奏效。还是)感谢你的建议! – Esben

回答

1

如果你的问题是与EOL被自动修改,然后

git config --global core.autocrlf false 

将是一个更好的配置,在任何其他的git操作完成。
查看“Definitive recommendation for git autocrlf settings”的优缺点。

+0

好吧,所以我开始了一个新项目 - 在我的git init-> add-> commit之前运行上面的命令,然后我运行bin/vendors安装,但仍然出现同样的错误? – Esben

+0

@Esben那么这些本地修改不仅仅是由于eol转换。您必须在流程开始时创建的.gitignore应该处理本地*私人*修改(即那些不应该版本化的修改)。检查一下'git diff-index --quiet HEAD'返回的结果(如http://stackoverflow.com/questions/8170240/mercurial-internals-git-subrepository-status-after-aggressive-permission-chang)。 – VonC

+0

我收到一台新电脑,必须重新安装Git。我注意到安装中的CRLF选项,并将其设置为false(不知道我以前有过什么)。由于这个供应商脚本已经完美运行,所以我接受你的答案。 – Esben

4

这里是你如何可以解决你的问题:

  1. 转到独白目录

    CD销售商/独白

  2. 了解你修改了什么(可选步骤)

    git的差异

  3. 取消您的修改

    git的结帐。

+0

这可能会奏效 - 通过其他方式解决我的问题。在VonC的回答中发表评论。这可能适用于其他人,所以感谢您的建议! – Esben