This is weird, seems like something small that I'm missing. A few days ago, when I composer install
I get Vendor directories with their own .git
, this allows me to make changes and update my own packaged repositories.
Today, after running composer install
, the .git
directories inside each package folder is missing! (I think this might have something to do with installing from cache?)
Could someone please try re-create this?
$ git clone https://github.com/nathankot/rbhpi
$ cd rbhpi
$ ./composer.phar install
$ cd vendor/rbhpi/core
$ ls -a
From the above commands, the .git
directory is missing for me.
I couldn't find this spec in the docs, but I did find it in this faq item:
Remove the .git directory of every dependency after the installation
Any solutions to my problem?
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.
Deleted . git folder can't be restored, unless you want to use a recovery tool. Anyway, since you've an online backup I think you should just clone it, if I where in ur place I would do the following: Then you can copy and paste changed files from ur existing local copy and then delete it.
Composer will look in all your repositories to find the packages your project requires. By default, only the Packagist.org repository is registered in Composer. You can add more repositories to your project by declaring them in composer. json .
Composer prefers the dist package of your dependencies, meaning dowloading a .tgz from github and unpacking it. If you want the source, install your vendors with
composer install --prefer-source
This will do a git checkout like you want.
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