Mr. B. Mr. B. - 3 months ago 8
Git Question

Git: how to unignore all Symfony vendor files?

unfortunately I can't use composer, due to low memory on the webspace. That's why I'm trying to push

vendor/*
to the git repository, to be able to pull the full project, including the dependencies.

In my
.gitignore
I'm forcing git to unignore the vendor files by
!/vendor/*
.

It works for most files, but not for
/vendor/friendsofsymfony/jsrouting-bundle
.

Content of
/vendor/friendsofsymfony/jsrouting-bundle/.gitignore
:

/phpunit.xml
/composer.lock
/composer.phar
/vendor/
/node_modules/


My repository is hosted at BitBucket. I don't know yet the meaning of the different folder-icon and the hashs next to it. If anyone knows, please comment.

enter image description here

Does anyone know how to force git to handle all the vendor files?

Thanks in advance!

Solutions

As the
jsrouting-bundle
is a
git submodule
, I chose this solution:

git submodule add git://github.com/FriendsOfSymfony/FOSJsRoutingBundle.git vendor/friendsofsymfony/jsrouting-bundle


Another way would be to use the deps file (not tested), source:
https://github.com/XKEYGmbH/ifresco-client/tree/master/vendor/friendsofsymfony/jsrouting-bundle/FOS/JsRoutingBundle/Resources/doc

Answer

The jsrouting-bundle folder is a Git submodule. A Git submodule is actually a reference to another Git repository. This is why you cannot add changes from it to your original Git repository.