From 5a0e97ccb632a24380dad3f2aab7f2df85570e84 Mon Sep 17 00:00:00 2001 From: Jonathan Reinink Date: Wed, 20 Mar 2013 18:42:32 -0300 Subject: [PATCH] Update should-i-commit-the-dependencies-in-my-vendor-directory.md Add a third option for including vendor dependencies in main GIT repo. --- ...-commit-the-dependencies-in-my-vendor-directory.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/doc/faqs/should-i-commit-the-dependencies-in-my-vendor-directory.md b/doc/faqs/should-i-commit-the-dependencies-in-my-vendor-directory.md index 8d4e63af2..179ce035f 100644 --- a/doc/faqs/should-i-commit-the-dependencies-in-my-vendor-directory.md +++ b/doc/faqs/should-i-commit-the-dependencies-in-my-vendor-directory.md @@ -16,11 +16,14 @@ problems: submodules. This is problematic because they are not real submodules, and you will run into issues. -If you really feel like you must do this, you have two options: +If you really feel like you must do this, you have three options: -- Limit yourself to installing tagged releases (no dev versions), so that you +1. Limit yourself to installing tagged releases (no dev versions), so that you only get zipped installs, and avoid problems with the git "submodules". -- Remove the `.git` directory of every dependency after the installation, then +2. Remove the `.git` directory of every dependency after the installation, then you can add them to your git repo. You can do that with `rm -rf vendor/**/.git` but this means you will have to delete those dependencies from disk before - running composer update. \ No newline at end of file + running composer update. +3. Add a .gitignore rule (`vendor/.git`) to ignore all the vendor .git folders. + This approach does not require to you delete dependencies from disk prior to + running composer update.