Laravel4 Composer update failing

2019-01-29 13:07发布

问题:

I'm working on a Laravel 4 project. When I try to update my packages with Composer, it gets to doctrine/collections but then throws this error:

[Runtime Exception]
Failed to execute git status --porcelain --untracked-files=no

error: bad index file sha1 signature
fatal: index file corrupt

Exception trace: http://pastebin.com/Js3nKrhy

I tried removing the index in doctrine/collections but then I it tells me the format is incorrect in refs/remotes/origin/master.

Any idea how to solve this issue? Thank you.

回答1:

You can probably fix this by removing the index (make a backup before, if you like):

$ rm -f .git/index

Then, restore your index:

$ git reset