News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Lorna Mitchell:
Using Composer Without GitIgnoring Vendor/
March 12, 2014 @ 12:45:23

In her latest post Lorna Mitchell looks at a method, when using Composer and git, to fix an issue around subdirectories that are git repositories and git thinking they should be submodules instead.

Recent additions to the joind.in API have introduced some new dependencies so we decided we'd start using Composer to manage these - but we don't want to run composer unsupervised. I'm sure this will bring the rain of "just run composer install, it's probably mostly almost safe" criticism, but actually it's quite tricky to run Composer without excluding vendor/ from source control so I thought I'd share how we did it so that anyone who wants to do so can learn from my experience!

She starts by describing the usual use of Composer - making the "composer.json", running the install and see the "vendor" directory being added. When she tried to check in the dependencies, git gave her an error about wanting them to be submodules. Instead, she figured out a way to add a line to the .gitignore to have it disregard the "vendor/.git" directory, making it work as expected.

0 comments voice your opinion now!
composer vendor install gitignore git

Link: http://www.lornajane.net/posts/2014/using-composer-without-gitignoring

blog comments powered by Disqus

Similar Posts

Ruslan Yakushev's Blog: How to install PHP PEAR and phploc on Windows

Derick Rethans' Blog: Find my Xdebug download wizard

Chance Garcia's Blog: MAMP PRO, PECL, SSH2, and OSX CLI (AKA acronym madness)

Phantom Reference Blog: Hello NetBeans, this is PHP!

ServerGrove Blog: Symfony + Git + Capistrano = Capifony


Community Events





Don't see your event here?
Let us know!


list developer api deployment bugfix conference symfony podcast interview community laravel language series tips opinion release library introduction zendserver framework

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework