Here is a quick tip on pulling dependencies in your project using git read-tree
command.
How to use a single component from some library (eg. Form from Symfony), but not the whole library (tried the git submodule ?).
-
Init project:
Create a new project and init Git:
$ mkdir newproject $ cd newproject $ git init
-
Setup remote:
You need to setup a
remote
(right now don't know how to skip the step) otherwise you would get afatal: Not a valid object name
error.$ git remote add -f symfony [email protected]:symfony/symfony.git
-
Import only the subdirecory subtree:
$ git read-tree --prefix=src/Symfony/Component/Form/ -u symfony/master:src/Symfony/Component/Form
-
Pull in new changes:
Pulling in changes might be as easy as repeating same steps over and over again but a better workflow should be proposed.
Any thoughts on pull/push are appreciated.