Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

composer error while updating ".git directory is missing"

Tags:

When I Updating zf-commons/zfc-admin using composer, it gives an RuntimeException error saying that

[RuntimeException]
The .git directory is missing from /var/www/site2.com/vendor/zf-commons/zfc
-admin, see http://getcomposer.org/commit-deps for more information

Since this error i cannot update any other modules in framework.

like image 734
doubleD Avatar asked Jan 09 '14 05:01

doubleD


People also ask

Why can't I see my .Git folder?

The . git folder is hidden to prevent accidental deletion or modification of the folder. The version history of the code base will be lost if this folder is deleted. This means, we will not be able to rollback changes made to the code in future.

What happens if the .Git directory gets deleted?

Deleting the . git folder does not delete the other files in that folder which is part of the git repository. However, the folder will no longer be under versioning control.

What is inside .Git folder?

The . git folder contains all the information that is necessary for your project in version control and all the information about commits, remote repository address, etc. All of them are present in this folder. It also contains a log that stores your commit history so that you can roll back to history.


2 Answers

When ever I have "issues" with composer the first thing I do is delete the vendor folder and do a "composer update"

You could also try to delete just that one component "vendor/zf-commons"

like image 127
NiGhTHawK Avatar answered Oct 10 '22 00:10

NiGhTHawK


The easiest way is to remove the install folder of that component before making the composer update

rm -rf  /var/www/site2.com/vendor/zf-commons/zfc composer update 
like image 31
Corneliu Avatar answered Oct 10 '22 00:10

Corneliu