2013-10-10 83 views
1

我要發佈這個,然後發佈答案,因爲它讓我瘋狂,直到我找出問題。由於gitattributes通過作曲家安裝symfony/symfony時出錯

安裝時通過作曲家的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沒有幫助。

回答

0

~/.gitattributes我有這樣一行:

* text=auto 

刪除它確保core.autocrl f設定爲「輸入」或「假」將解決這個問題。

FWIW,我在Mac上,我有類似的問題,我希望這個修復。