In several dependency managers, it is good practice not to include the files downloaded by the manager within your repository, always being downloaded through the manager. If so, add the manager folders/files to the .gitignore
.
If you prefer to download other repositories inside yours, you can use submodules.
To add a submodule to your project use:
git submodule add https://github.com/chaconinc/DbConnector
Where the URL will be from the repository you are downloading.
When cloning a repository with submodules, they will come empty by default. To download them, use:
git submodule init
git submodule update
So you update the settings and download the submodule repository.
put it inside . gitignore
– Ivan Ferrer
The "vendor" folder will always be ignored anyway, because it is individual. Because for each application Composer will download all its dependencies individually, that is, if you have 3 applications, Composer.phar will be only 1, however vendors will be specific to each project.
– Ivan Ferrer
Read it here, it may help you: http://tableless.com.br/composer-um-pouco-basic/
– Ivan Ferrer
Here in the company are using a CMS that installs with a php and does not come Composer.json.
– Raank
So you can browse the directory
vendor
you have to enable it by the Composer."config": { "vendor-dir": "3rdparty" }
– Ivan Ferrer
So the way is really drag. In your case.
– Ivan Ferrer
But strange, because if you clone a dependency with Composer, I imagine there is Composer.json
– Ivan Ferrer
git add --all, or git add . ? git add --all is to remove all not?
– Ivan Ferrer
In the dependencies there are the json, my application that does not exist, understand?
– Raank