我要发布这个,然后发布答案,因为它使我疯狂,直到我找到了问题。
当通过composer安装symfony/symfony时,由于此错误,进程多次中止:
[RuntimeException]
Failed to execute git checkout 'fc0a09a2052e9275c16b5ab7af426935fe432f39' && git reset --hard 'fc0a09a2052e9275c16b5ab7af426935fe432f39'
error: Your local changes to the following files would be overwritten by checkout:
src/Symfony/Component/Validator/Resources/translations/validators.bg.xlf
Please, commit your changes or stash them before you can switch branches.
Aborting
我知道它与克隆上的git更改空格或行尾有关,然后当它尝试签出特定的提交时,它会失败,因为行尾现在已经更改了。git config core.autocrlf input
没有帮忙。
发布于 2013-10-10 12:19:13
在~/.gitattributes
中,我有这样一行:
* text=auto
删除它并确保core.autocrl
f设置为“输入”或"false“将修复此问题。
FWIW,我在一台Mac电脑上,我和Homebrew有类似的问题,我希望这能解决问题。
https://stackoverflow.com/questions/19305306
复制