When I run composer install --prefer-source
or try to update this one particular bundle ( others work well ) I get this error:
Failed to download some-bundle from source: Failed to execute git checkout 'xx' -- && git reset --hard 'xx' --
error: The following untracked working tree files would be overwritten by checkout:
...
[ list of all files in repo on a branch that interests me ]
...
Please move or remove them before you can switch branches.
Aborting
I'm assuming I messed up something on the bundle repository, but have no idea what.
What is interesting - the error occurs only on docker on MAC. On other pc with linux it works fine.
It looks like you have manually updated the sources in your vendor directory of this bundle.
If so, try to commit/push or reset them directly in the vendor directory before updating the package.
If not, it may relates to this issue: https://github.com/composer/composer/issues/2896
The author writes:
"This can be fixed in two ways:
when stashing, add --include-untracked flag which will stash newly added files as well.
when checking out, add --force flag which will overwrite files instead of aborting."
If nothing helps you can manually delete the vendor directory to force composer to newly install the package. Edit Please take also a look at https://getcomposer.org/doc/03-cli.md#clear-cache, maybe composer has cached the git repository somewhere and cannot update it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With